aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2010-03-18 15:04:15 +0000
committerMax Horn2010-03-18 15:04:15 +0000
commita17bbf3c2e8b9f9983adf2fd84fa8c7525f78cbb (patch)
tree3db4e9c71e716684bb15d987d8a903dd2a83b6df
parent80a81111938088f6730a5abfd03e6004f0c807bf (diff)
downloadscummvm-rg350-a17bbf3c2e8b9f9983adf2fd84fa8c7525f78cbb.tar.gz
scummvm-rg350-a17bbf3c2e8b9f9983adf2fd84fa8c7525f78cbb.tar.bz2
scummvm-rg350-a17bbf3c2e8b9f9983adf2fd84fa8c7525f78cbb.zip
GUI: Make GuiObject::_name const, init all members in constructor
svn-id: r48275
-rw-r--r--gui/object.cpp4
-rw-r--r--gui/object.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/gui/object.cpp b/gui/object.cpp
index aaa5a1a4b3..537c127033 100644
--- a/gui/object.cpp
+++ b/gui/object.cpp
@@ -30,8 +30,8 @@
namespace GUI {
-GuiObject::GuiObject(const Common::String &name) : _firstWidget(0) {
- _name = name;
+GuiObject::GuiObject(const Common::String &name)
+ : _x(-1000), _y(-1000), _w(0), _h(0), _name(name), _firstWidget(0) {
reflowLayout();
}
diff --git a/gui/object.h b/gui/object.h
index 1c8bcdfdcc..fb5ff18290 100644
--- a/gui/object.h
+++ b/gui/object.h
@@ -62,7 +62,7 @@ class GuiObject : public CommandReceiver {
protected:
int16 _x, _y;
uint16 _w, _h;
- Common::String _name;
+ const Common::String _name;
Widget *_firstWidget;