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:
@ -155,7 +155,7 @@ bool StyleAttrs::sizeDiffs (StyleAttrs *otherStyle)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool StyleAttrs::equals (object::Object *other) {
|
||||
bool StyleAttrs::equals (const object::Object *other) const {
|
||||
StyleAttrs *otherAttrs = (StyleAttrs *) other;
|
||||
|
||||
return this == otherAttrs ||
|
||||
@ -398,7 +398,7 @@ void Style::copyAttrs (StyleAttrs *attrs)
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
bool FontAttrs::equals(object::Object *other)
|
||||
bool FontAttrs::equals(const object::Object *other) const
|
||||
{
|
||||
FontAttrs *otherAttrs = (FontAttrs*)other;
|
||||
return
|
||||
@ -456,7 +456,7 @@ bool Font::exists (Layout *layout, const char *name)
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
bool ColorAttrs::equals(object::Object *other)
|
||||
bool ColorAttrs::equals(const object::Object *other) const
|
||||
{
|
||||
ColorAttrs *oc = (ColorAttrs*)other;
|
||||
return this == oc || (color == oc->color);
|
||||
|
||||
Reference in New Issue
Block a user