From 61a5caef2951f7e0e3a660514eb5d778d787df8f Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Fri, 10 Oct 2008 09:19:19 +0000 Subject: Some old uncommitted cleanup. --- src/gui/shop.cpp | 5 ----- src/gui/shop.h | 5 ----- src/resources/itemdb.cpp | 4 ++-- src/shopitem.h | 1 - 4 files changed, 2 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/gui/shop.cpp b/src/gui/shop.cpp index c5e257da..2a7ea0ce 100644 --- a/src/gui/shop.cpp +++ b/src/gui/shop.cpp @@ -45,11 +45,6 @@ void ShopItems::addItem(int id, int amount, int price) mShopItems.push_back(new ShopItem(id, amount, price)); } -void ShopItems::addItem(ShopItem* shopItem) -{ - mShopItems.push_back(shopItem); -} - ShopItem* ShopItems::at(int i) { return mShopItems.at(i); diff --git a/src/gui/shop.h b/src/gui/shop.h index 281f4c6d..f4329b4d 100644 --- a/src/gui/shop.h +++ b/src/gui/shop.h @@ -46,11 +46,6 @@ class ShopItems : public gcn::ListModel */ void addItem(int id, int amount, int price); - /** - * Convenience function for adding items. - */ - void addItem(ShopItem* shopItem); - /** * Returns the number of items in the shop. */ diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp index 202f4ba7..0f89f444 100644 --- a/src/resources/itemdb.cpp +++ b/src/resources/itemdb.cpp @@ -55,7 +55,7 @@ static char const *const fields[][2] = { "mp", N_("MP %+d") } }; -ItemType itemTypeFromString (std::string name, int id = 0) +static ItemType itemTypeFromString(const std::string &name, int id = 0) { if (name=="generic") return ITEM_UNUSABLE; else if (name=="usable") return ITEM_USABLE; @@ -73,7 +73,7 @@ ItemType itemTypeFromString (std::string name, int id = 0) else return ITEM_UNUSABLE; } -WeaponType weaponTypeFromString (std::string name, int id = 0) +static WeaponType weaponTypeFromString(const std::string &name, int id = 0) { if (name=="knife") return WPNTYPE_KNIFE; else if (name=="sword") return WPNTYPE_SWORD; diff --git a/src/shopitem.h b/src/shopitem.h index ffafbebe..6e7606ac 100644 --- a/src/shopitem.h +++ b/src/shopitem.h @@ -51,7 +51,6 @@ class ShopItem : public Item protected: int mPrice; - int mIndex; std::string mDisplayName; }; -- cgit v1.2.3-60-g2f50