summaryrefslogtreecommitdiff
path: root/src/item.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-02-25 03:35:52 +0300
committerAndrei Karas <akaras@inbox.ru>2013-02-25 03:35:52 +0300
commit8478d540748edccf36dc9bda5f0c3de0aa7bf763 (patch)
tree941a08937450982abb8781e8dd4bd4bd209cf88c /src/item.cpp
parent6ce49efadfadd8eacb048df274979736bb04daf0 (diff)
downloadManaVerse-8478d540748edccf36dc9bda5f0c3de0aa7bf763.tar.gz
ManaVerse-8478d540748edccf36dc9bda5f0c3de0aa7bf763.tar.bz2
ManaVerse-8478d540748edccf36dc9bda5f0c3de0aa7bf763.tar.xz
ManaVerse-8478d540748edccf36dc9bda5f0c3de0aa7bf763.zip
Improve string usage in other files.
Diffstat (limited to 'src/item.cpp')
-rw-r--r--src/item.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/item.cpp b/src/item.cpp
index 37d353fb4..261279002 100644
--- a/src/item.cpp
+++ b/src/item.cpp
@@ -82,7 +82,8 @@ void Item::setId(const int id, const unsigned char color)
mTags = info.getTags();
SpriteDisplay display = info.getDisplay();
- std::string imagePath = paths.getStringValue("itemIcons") + display.image;
+ std::string imagePath = paths.getStringValue(
+ "itemIcons").append(display.image);
std::string dye = combineDye2(imagePath, info.getDyeColorsString(color));
mImage = resman->getImage(dye);
mDrawImage = resman->getImage(dye);
@@ -112,9 +113,9 @@ Image *Item::getImage(const int id, const unsigned char color)
ResourceManager *const resman = ResourceManager::getInstance();
const ItemInfo &info = ItemDB::get(id);
SpriteDisplay display = info.getDisplay();
- std::string imagePath = paths.getStringValue("itemIcons") + display.image;
- Image *image;
- image = resman->getImage(combineDye2(imagePath,
+ std::string imagePath = paths.getStringValue(
+ "itemIcons").append(display.image);
+ Image *image = resman->getImage(combineDye2(imagePath,
info.getDyeColorsString(color)));
if (!image)