summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-07-08 20:42:40 +0300
committerAndrei Karas <akaras@inbox.ru>2011-07-08 20:42:40 +0300
commit1fcd75140b847a0e50584fc07fc47d90c9dd9fa8 (patch)
tree5c1b23c7eabc7d421f46d40ab0bf787ef7dac49b /src/gui
parent53bc0b25c23f8f24d4119ae6fb5ba6ca0a91be19 (diff)
downloadmanaverse-1fcd75140b847a0e50584fc07fc47d90c9dd9fa8.tar.gz
manaverse-1fcd75140b847a0e50584fc07fc47d90c9dd9fa8.tar.bz2
manaverse-1fcd75140b847a0e50584fc07fc47d90c9dd9fa8.tar.xz
manaverse-1fcd75140b847a0e50584fc07fc47d90c9dd9fa8.zip
Add small optimisations and fixes.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/outfitwindow.cpp4
-rw-r--r--src/gui/outfitwindow.h4
-rw-r--r--src/gui/widgets/layouthelper.cpp2
-rw-r--r--src/gui/widgets/layouthelper.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/outfitwindow.cpp b/src/gui/outfitwindow.cpp
index 93dbd77a9..9dd41a643 100644
--- a/src/gui/outfitwindow.cpp
+++ b/src/gui/outfitwindow.cpp
@@ -487,7 +487,7 @@ void OutfitWindow::unequipNotInOutfit(int outfit)
}
}
-int OutfitWindow::keyToNumber(SDLKey key)
+int OutfitWindow::keyToNumber(SDLKey key) const
{
int outfitNum = -1;
switch (key)
@@ -672,7 +672,7 @@ int OutfitWindow::keyToNumber(SDLKey key)
return outfitNum;
}
-SDLKey OutfitWindow::numberToKey(int number)
+SDLKey OutfitWindow::numberToKey(int number) const
{
SDLKey key = SDLK_UNKNOWN;
switch (number)
diff --git a/src/gui/outfitwindow.h b/src/gui/outfitwindow.h
index 7fd29608c..2d2f6271b 100644
--- a/src/gui/outfitwindow.h
+++ b/src/gui/outfitwindow.h
@@ -82,9 +82,9 @@ class OutfitWindow : public Window, gcn::ActionListener
void unequipNotInOutfit(int outfit);
- int keyToNumber(SDLKey key);
+ int keyToNumber(SDLKey key) const;
- SDLKey numberToKey(int number);
+ SDLKey numberToKey(int number) const;
void next();
diff --git a/src/gui/widgets/layouthelper.cpp b/src/gui/widgets/layouthelper.cpp
index ace204143..54c41635f 100644
--- a/src/gui/widgets/layouthelper.cpp
+++ b/src/gui/widgets/layouthelper.cpp
@@ -35,7 +35,7 @@ LayoutHelper::~LayoutHelper()
mContainer->removeWidgetListener(this);
}
-Layout &LayoutHelper::getLayout()
+const Layout &LayoutHelper::getLayout() const
{
return mLayout;
}
diff --git a/src/gui/widgets/layouthelper.h b/src/gui/widgets/layouthelper.h
index 9b2795be7..c38356c07 100644
--- a/src/gui/widgets/layouthelper.h
+++ b/src/gui/widgets/layouthelper.h
@@ -54,7 +54,7 @@ class LayoutHelper : public gcn::WidgetListener
/**
* Gets the layout handler.
*/
- Layout &getLayout();
+ const Layout &getLayout() const;
/**
* Computes the position of the widgets according to the current