From 186eb8dcc63052a167c61f29828a54902916c74d 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/itemdb.cpp') diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp index 49ba7bd9e..3f17c22ad 100644 --- a/src/resources/itemdb.cpp +++ b/src/resources/itemdb.cpp @@ -140,12 +140,6 @@ static ItemType itemTypeFromString(const std::string &name) } } -static std::string normalized(const std::string &name) -{ - std::string normalized = name; - return toLower(trim(normalized)); -} - void ItemDB::load() { if (mLoaded) @@ -315,7 +309,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()) @@ -413,7 +407,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-60-g2f50