diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-01-13 15:02:23 +0100 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-01-13 16:53:29 +0200 |
commit | 186eb8dcc63052a167c61f29828a54902916c74d (patch) | |
tree | 8eb97be1bd969ade487d541a721250c22b4c558f /src/resources/itemdb.cpp | |
parent | 6c885855b0c06bd7c4b6ab3574d8e2f3398ad97a (diff) | |
download | plus-186eb8dcc63052a167c61f29828a54902916c74d.tar.gz plus-186eb8dcc63052a167c61f29828a54902916c74d.tar.bz2 plus-186eb8dcc63052a167c61f29828a54902916c74d.tar.xz plus-186eb8dcc63052a167c61f29828a54902916c74d.zip |
Moved the normalize() function in strungUtils where it belongs.
(Preparation for bringing a smaller item loading refactoring patch.)
Trivial.
Diffstat (limited to 'src/resources/itemdb.cpp')
-rw-r--r-- | src/resources/itemdb.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
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()) { |