Fixing list copy and grammar sentence generation
This commit is contained in:
parent
43fe34dcbf
commit
0a886bd8a8
5 changed files with 38 additions and 13 deletions
|
|
@ -243,7 +243,7 @@ namespace tp {
|
|||
}
|
||||
|
||||
[[nodiscard]] bool operator==(const List& in) const {
|
||||
if (in == *this) { return true; }
|
||||
if (&in == this) { return true; }
|
||||
if (in.length() != length()) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -253,6 +253,8 @@ namespace tp {
|
|||
if (left->data != right->data) {
|
||||
return false;
|
||||
}
|
||||
left = left->next;
|
||||
right = right->next;
|
||||
}
|
||||
if (left != right) {
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue