summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-10-10 09:19:19 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-10-10 09:19:19 +0000
commit61a5caef2951f7e0e3a660514eb5d778d787df8f (patch)
treed6b22d35689b337ca880d3d3e4131e41d9f50df0 /src
parentcea90791bce5f502c33b7eefd9502e7c2452366a (diff)
downloadmana-client-61a5caef2951f7e0e3a660514eb5d778d787df8f.tar.gz
mana-client-61a5caef2951f7e0e3a660514eb5d778d787df8f.tar.bz2
mana-client-61a5caef2951f7e0e3a660514eb5d778d787df8f.tar.xz
mana-client-61a5caef2951f7e0e3a660514eb5d778d787df8f.zip
Some old uncommitted cleanup.
Diffstat (limited to 'src')
-rw-r--r--src/gui/shop.cpp5
-rw-r--r--src/gui/shop.h5
-rw-r--r--src/resources/itemdb.cpp4
-rw-r--r--src/shopitem.h1
4 files changed, 2 insertions, 13 deletions
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
@@ -47,11 +47,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.
*/
int getNumberOfElements();
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;
};