From 7e43b82e3b7cda034fab34c15ecfaa97c1a99146 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Wed, 18 Feb 2009 20:14:23 +0100 Subject: Introduced a toLower method and grouped string utils The string utility methods are now grouped together in the stringutils.h header. Also, a toLower method was added for convenience. --- src/resources/itemdb.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/resources/itemdb.cpp') diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp index 577b9947..fec52150 100644 --- a/src/resources/itemdb.cpp +++ b/src/resources/itemdb.cpp @@ -29,7 +29,7 @@ #include "../utils/dtor.h" #include "../utils/gettext.h" -#include "../utils/trim.h" +#include "../utils/stringutils.h" #include "../utils/xml.h" namespace @@ -124,12 +124,7 @@ void ItemDB::load() if (itr == mNamedItemInfos.end()) { std::string temp = name; - trim(temp); - - for (unsigned int i = 0; i < temp.size(); i++) - { - temp[i] = (char) tolower(temp[i]); - } + toLower(trim(temp)); mNamedItemInfos[temp] = itemInfo; } -- cgit v1.2.3-70-g09d2