From 41cc92f73e39cec5dfea6b1164176610cccc7df4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 15 Aug 2015 13:58:32 +0300 Subject: Add strong typed int for item color. --- src/gui/models/shopitems.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/gui/models/shopitems.h') diff --git a/src/gui/models/shopitems.h b/src/gui/models/shopitems.h index b222f9385..c964bdfb9 100644 --- a/src/gui/models/shopitems.h +++ b/src/gui/models/shopitems.h @@ -23,6 +23,8 @@ #ifndef GUI_MODELS_SHOPITEMS_H #define GUI_MODELS_SHOPITEMS_H +#include "enums/simpletypes/itemcolor.h" + #include "gui/models/listmodel.h" #include @@ -60,7 +62,7 @@ class ShopItems final : public ListModel */ ShopItem *addItem(const int id, const int type, - const unsigned char color, + const ItemColor color, const int amount, const int price); @@ -76,13 +78,13 @@ class ShopItems final : public ListModel ShopItem *addItem2(const int inventoryIndex, const int id, const int type, - const unsigned char color, + const ItemColor color, const int amount, const int price); ShopItem *addItemNoDup(const int id, const int type, - const unsigned char color, + const ItemColor color, const int amount, const int price); @@ -145,7 +147,7 @@ class ShopItems final : public ListModel * @return the item found or 0 */ ShopItem *findItem(const int id, - const unsigned char color) const A_WARN_UNUSED; + const ItemColor color) const A_WARN_UNUSED; bool findInAllItems(std::vector::iterator &it, const ShopItem *const item); -- cgit v1.2.3-60-g2f50