summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-01-28 13:43:46 -0700
committerIra Rice <irarice@gmail.com>2009-01-28 13:43:46 -0700
commit487b7237a730469fc4f8a501a93f78c2bbafad51 (patch)
treebaae7f42eb6ab634057ad29e7cba2bc914c85551 /src/resources
parent8b71ee703caa6bf289f25d8c7118636592771412 (diff)
downloadmana-487b7237a730469fc4f8a501a93f78c2bbafad51.tar.gz
mana-487b7237a730469fc4f8a501a93f78c2bbafad51.tar.bz2
mana-487b7237a730469fc4f8a501a93f78c2bbafad51.tar.xz
mana-487b7237a730469fc4f8a501a93f78c2bbafad51.zip
Removed manual trimmings in exchange for using trim.h instead.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/itemdb.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp
index 773febd7..384efdf1 100644
--- a/src/resources/itemdb.cpp
+++ b/src/resources/itemdb.cpp
@@ -31,6 +31,7 @@
#include "../utils/dtor.h"
#include "../utils/gettext.h"
+#include "../utils/trim.h"
#include "../utils/xml.h"
namespace
@@ -125,14 +126,7 @@ void ItemDB::load()
if (itr == mNamedItemInfos.end())
{
std::string temp = name;
- while (temp[0] == ' ')
- {
- temp = temp.substr(1, temp.size());
- }
- while (temp[temp.size()] == ' ')
- {
- temp = temp.substr(0, temp.size() - 1);
- }
+ trim(temp);
for (unsigned int i = 0; i < temp.size(); i++)
{