Some of the Object::equals now are const correct.
There's more to do. Why make this const-correct, instead of ditch it? Because whatever I replace it with has to be ready for const correctness.
This commit is contained in:
@ -313,7 +313,7 @@ int List::size ()
|
||||
return numElements;
|
||||
}
|
||||
|
||||
bool List::equals(Object *other)
|
||||
bool List::equals(const Object *other) const
|
||||
{
|
||||
List *otherList = (List*)other;
|
||||
Node *node1 = first, *node2 = otherList->first;
|
||||
|
||||
Reference in New Issue
Block a user