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.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/gui/models/shopitems.cpp') diff --git a/src/gui/models/shopitems.cpp b/src/gui/models/shopitems.cpp index 409ca3f63..05c4a5e6c 100644 --- a/src/gui/models/shopitems.cpp +++ b/src/gui/models/shopitems.cpp @@ -53,7 +53,7 @@ std::string ShopItems::getElementAt(int i) ShopItem *ShopItems::addItem(const int id, const int type, - const unsigned char color, + const ItemColor color, const int amount, const int price) { @@ -65,7 +65,7 @@ ShopItem *ShopItems::addItem(const int id, ShopItem *ShopItems::addItemNoDup(const int id, const int type, - const unsigned char color, + const ItemColor color, const int amount, const int price) { @@ -82,7 +82,7 @@ ShopItem *ShopItems::addItemNoDup(const int id, ShopItem *ShopItems::addItem2(const int inventoryIndex, const int id, const int type, - const unsigned char color, + const ItemColor color, const int quantity, const int price) { @@ -155,7 +155,8 @@ void ShopItems::clear() mShopItems.clear(); } -ShopItem *ShopItems::findItem(const int id, const unsigned char color) const +ShopItem *ShopItems::findItem(const int id, + const ItemColor color) const { std::vector::const_iterator it = mShopItems.begin(); const std::vector::const_iterator e = mShopItems.end(); -- cgit v1.2.3-60-g2f50