mirror of
https://hub.njuu.cf/TheAlgorithms/C-Plus-Plus.git
synced 2023-10-11 13:05:55 +08:00
Update circular_linked_list.cpp
This commit is contained in:
parent
18c7f8719e
commit
b97d2b9b66
@ -70,10 +70,14 @@ class CircularLinkedList {
|
|||||||
/**
|
/**
|
||||||
* @brief Copy constructor for CircularLinkedList.
|
* @brief Copy constructor for CircularLinkedList.
|
||||||
*/
|
*/
|
||||||
CircularLinkedList(CircularLinkedList& copy) {
|
CircularLinkedList(const CircularLinkedList& copy) {
|
||||||
root = copy.root;
|
root = copy.root;
|
||||||
end = copy.end;
|
end = copy.end;
|
||||||
}
|
}
|
||||||
|
void operator=(const CircularLinkedList& other) {
|
||||||
|
root = other.root;
|
||||||
|
end = other.end;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @brief Cleans up memory
|
* @brief Cleans up memory
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user