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:
@ -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();
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user