From 5f54ef36e27e13dd37e232eca74fd196f31e7807 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Thu, 13 Jan 2011 15:02:23 +0100 Subject: Moved the normalize() function in strungUtils where it belongs. (Preparation for bringing a smaller item loading refactoring patch.) Trivial. --- src/resources/itemdb.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/resources') diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp index b167e956..019c66e3 100644 --- a/src/resources/itemdb.cpp +++ b/src/resources/itemdb.cpp @@ -75,12 +75,6 @@ static ItemType itemTypeFromString(const std::string &name, int id = 0) else return ITEM_UNUSABLE; } -static std::string normalized(const std::string &name) -{ - std::string normalized = name; - return toLower(trim(normalized));; -} - void ItemDB::load() { if (mLoaded) @@ -275,7 +269,7 @@ void ItemDB::load() mItemInfos[id] = itemInfo; if (!name.empty()) { - std::string temp = normalized(name); + std::string temp = normalize(name); NamedItemInfos::const_iterator itr = mNamedItemInfos.find(temp); if (itr == mNamedItemInfos.end()) @@ -354,7 +348,7 @@ const ItemInfo &ItemDB::get(const std::string &name) { assert(mLoaded); - NamedItemInfos::const_iterator i = mNamedItemInfos.find(normalized(name)); + NamedItemInfos::const_iterator i = mNamedItemInfos.find(normalize(name)); if (i == mNamedItemInfos.end()) { -- cgit v1.2.3-70-g09d2