diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-04-02 06:23:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-04-03 18:44:58 +0300 |
commit | 49631972db5b965413d4bbe36983a8d5bd203183 (patch) | |
tree | cb31545521cb4b33e65f8e94e7f2d5cd33e9e7a1 /src/resources/item/item.cpp | |
parent | be7786e70668c014b19263895a6c8f507ed8161d (diff) | |
download | plus-49631972db5b965413d4bbe36983a8d5bd203183.tar.gz plus-49631972db5b965413d4bbe36983a8d5bd203183.tar.bz2 plus-49631972db5b965413d4bbe36983a8d5bd203183.tar.xz plus-49631972db5b965413d4bbe36983a8d5bd203183.zip |
Use pathJoin for concatinate some paths.
Diffstat (limited to 'src/resources/item/item.cpp')
-rw-r--r-- | src/resources/item/item.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/resources/item/item.cpp b/src/resources/item/item.cpp index 99fed928d..d738ca0e3 100644 --- a/src/resources/item/item.cpp +++ b/src/resources/item/item.cpp @@ -97,15 +97,15 @@ void Item::setId(const int id, const ItemInfo &info = getInfo(); mTags = info.getTags(); - const std::string dye = combineDye2(paths.getStringValue( - "itemIcons").append(info.getDisplay().image), + const std::string dye = combineDye2(pathJoin( + paths.getStringValue("itemIcons"), info.getDisplay().image), info.getDyeIconColorsString(color)); mImage = Loader::getImage(dye); if (!mImage) { mImage = Theme::getImageFromTheme(paths.getValue("unknownItemFile", - "unknown-item.png")); + "unknown-item.png")); } } @@ -121,8 +121,8 @@ Image *Item::getImage(const int id, const ItemColor color) { const ItemInfo &info = ItemDB::get(id); - Image *image = Loader::getImage(combineDye2(paths.getStringValue( - "itemIcons").append(info.getDisplay().image), + Image *image = Loader::getImage(combineDye2(pathJoin(paths.getStringValue( + "itemIcons"), info.getDisplay().image), info.getDyeIconColorsString(color))); if (!image) |