aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/ui
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2013-10-28 18:37:20 +0100
committerEinar Johan Trøan Sømåen2013-10-28 18:37:20 +0100
commit889c3c9801e714f7c2de7a73cc877835a0b1fed5 (patch)
tree00a54955b9e5bcbd3f8efdd9c00092b8d5bca84b /engines/wintermute/ui
parentad586412425e66e0e678f0cfd7b8c78c58a8a855 (diff)
downloadscummvm-rg350-889c3c9801e714f7c2de7a73cc877835a0b1fed5.tar.gz
scummvm-rg350-889c3c9801e714f7c2de7a73cc877835a0b1fed5.tar.bz2
scummvm-rg350-889c3c9801e714f7c2de7a73cc877835a0b1fed5.zip
WINTERMUTE: Deconstify UIObject::getHeight() to fix a shadowed overload.
Diffstat (limited to 'engines/wintermute/ui')
-rw-r--r--engines/wintermute/ui/ui_object.cpp5
-rw-r--r--engines/wintermute/ui/ui_object.h2
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;