diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-08-27 01:27:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-08-27 01:27:11 +0300 |
commit | de476bb95242e10c833394ef007728072eabe60f (patch) | |
tree | 033747127a7ea4e36de42cfc99fcee56ce915bbb /src/gui/equipmentwindow.h | |
parent | a33a8dc48761d7cb2b4c1c468e1e3b188bcbf709 (diff) | |
download | mv-de476bb95242e10c833394ef007728072eabe60f.tar.gz mv-de476bb95242e10c833394ef007728072eabe60f.tar.bz2 mv-de476bb95242e10c833394ef007728072eabe60f.tar.xz mv-de476bb95242e10c833394ef007728072eabe60f.zip |
Add const to more classes.
Diffstat (limited to 'src/gui/equipmentwindow.h')
-rw-r--r-- | src/gui/equipmentwindow.h | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/gui/equipmentwindow.h b/src/gui/equipmentwindow.h index a95e98c13..ad90bca12 100644 --- a/src/gui/equipmentwindow.h +++ b/src/gui/equipmentwindow.h @@ -51,7 +51,7 @@ namespace gcn struct EquipmentBox { - EquipmentBox(int x0, int y0, Image *img) : + EquipmentBox(const int x0, const int y0, Image *const img) : x(x0), y(y0), image(img) { } @@ -71,8 +71,8 @@ class EquipmentWindow : public Window, public gcn::ActionListener /** * Constructor. */ - EquipmentWindow(Equipment *equipment, Being *being, - bool mCloseOnHide = false); + EquipmentWindow(Equipment *const equipment, Being *const being, + const bool foring = false); /** * Destructor. @@ -91,34 +91,36 @@ class EquipmentWindow : public Window, public gcn::ActionListener Item* getEquipment(int i) const { return mEquipment ? mEquipment->getEquipment(i) : nullptr; } - void setBeing(Being *being); + void setBeing(Being *const being); - void updateBeing(Being *being); + void updateBeing(Being *const being); - void resetBeing(Being *being); + void resetBeing(const Being *const being); private: void mouseExited(gcn::MouseEvent &event); void mouseMoved(gcn::MouseEvent &event); - Item *getItem(int x, int y) const; + Item *getItem(const int x, const int y) const; - void setSelected(int index); + void setSelected(const int index); void fillBoxes(); void fillDefault(); - void addBox(int idx, int x, int y, int imageIndex); + void addBox(const int idx, const int x, const int y, + const int imageIndex); - void loadWindow(XmlNodePtr windowNode); + void loadWindow(const XmlNodePtr windowNode); - void loadPlayerBox(XmlNodePtr playerBoxNode); + void loadPlayerBox(const XmlNodePtr playerBoxNode); - void loadSlot(XmlNodePtr slotNode, ImageSet *imageset); + void loadSlot(const XmlNodePtr slotNode, + const ImageSet *const imageset); - int parseSlotName(std::string name); + int parseSlotName(std::string name) const; Equipment *mEquipment; |