diff options
-rw-r--r-- | engines/wintermute/ui/ui_object.cpp | 5 | ||||
-rw-r--r-- | engines/wintermute/ui/ui_object.h | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/engines/wintermute/ui/ui_object.cpp b/engines/wintermute/ui/ui_object.cpp index a8da89b011..fbe18ef6ad 100644 --- a/engines/wintermute/ui/ui_object.cpp +++ b/engines/wintermute/ui/ui_object.cpp @@ -652,7 +652,10 @@ int32 UIObject::getWidth() const { return _width; } -int32 UIObject::getHeight() const { +// Has to be non-const to allow the virtual override to work, +// as other getHeight()-functions currently have the potential +// of having side-effects. +int32 UIObject::getHeight() { return _height; } diff --git a/engines/wintermute/ui/ui_object.h b/engines/wintermute/ui/ui_object.h index 8d14d8a6a4..ecbaebcee6 100644 --- a/engines/wintermute/ui/ui_object.h +++ b/engines/wintermute/ui/ui_object.h @@ -69,7 +69,7 @@ public: TUIObjectType _type; int32 getWidth() const; - int32 getHeight() const; + int32 getHeight() override; void setHeight(int32 height); void setWidth(int32 width); bool isDisabled() const; |