From 46f0755975033f37eaae9db73c0e2b6499c2a923 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 30 Aug 2012 02:10:59 +0300 Subject: Add const to more classes. --- src/gui/widgets/itemcontainer.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/gui/widgets/itemcontainer.h') diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h index 0ad95fd1b..f39af8d7e 100644 --- a/src/gui/widgets/itemcontainer.h +++ b/src/gui/widgets/itemcontainer.h @@ -60,7 +60,8 @@ class ItemContainer : public gcn::Widget, * @param gridRows Amount of rows in grid. * @param offset Index offset */ - ItemContainer(Inventory *inventory, bool forceQuantity = false); + ItemContainer(Inventory *const inventory, + const bool forceQuantity = false); /** * Destructor. @@ -117,9 +118,9 @@ class ItemContainer : public gcn::Widget, void removeSelectionListener(gcn::SelectionListener *listener) { mSelectionListeners.remove(listener); } - void setFilter (int tag); + void setFilter(const int tag); - void setSortType (int sortType); + void setSortType(const int sortType); void setName(std::string str) { mName = str; } @@ -157,12 +158,12 @@ class ItemContainer : public gcn::Widget, * * @param direction The move direction of the highlighter. */ - void moveHighlight(Direction direction); + void moveHighlight(const Direction direction); /** * Sets the currently selected item. */ - void setSelectedIndex(int index); + void setSelectedIndex(const int index); /** * Determine and set the height of the container. @@ -181,7 +182,7 @@ class ItemContainer : public gcn::Widget, * @param y The Y coordinate position. * @return The slot index on success, -1 on failure. */ - int getSlotIndex(int x, int y) const; + int getSlotIndex(const int x, const int y) const; Inventory *mInventory; -- cgit v1.2.3-60-g2f50