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:
2025-08-22 13:58:05 -04:00
parent f6841f59e0
commit e4f1102e32
8 changed files with 38 additions and 32 deletions

View File

@ -508,7 +508,7 @@ public:
int top, right, bottom, left;
inline void setVal(int val) { top = right = bottom = left = val; }
inline bool equals (Box *other) {
inline bool equals (const Box *other) const {
return top == other->top &&
right == other->right &&
bottom == other->bottom &&
@ -603,7 +603,7 @@ public:
inline bool hasBackground ()
{ return backgroundColor != NULL || backgroundImage != NULL; }
bool equals (lout::object::Object *other);
bool equals (const lout::object::Object *other) const override;
int hashValue ();
};
@ -688,7 +688,7 @@ public:
FontVariant fontVariant;
FontStyle style;
bool equals(lout::object::Object *other);
bool equals(const lout::object::Object *other) const override;
int hashValue();
};
@ -742,7 +742,7 @@ public:
inline int getColor () { return color; }
bool equals(lout::object::Object *other);
bool equals(const lout::object::Object *other) const override;
int hashValue();
};