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 | |
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')
-rw-r--r-- | src/resources/item/item.cpp | 10 | ||||
-rw-r--r-- | src/resources/map/map.cpp | 4 | ||||
-rw-r--r-- | src/resources/sprite/spritedef.cpp | 2 |
3 files changed, 8 insertions, 8 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) diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp index 571b19abd..b7e5d1fca 100644 --- a/src/resources/map/map.cpp +++ b/src/resources/map/map.cpp @@ -1250,8 +1250,8 @@ void Map::saveExtraLayer() const restrict2 std::string Map::getUserMapDirectory() const restrict2 { - return settings.serverConfigDir + - dirSeparator + getProperty("_realfilename"); + return pathJoin(settings.serverConfigDir, + getProperty("_realfilename")); } void Map::addRange(const std::string &restrict name, diff --git a/src/resources/sprite/spritedef.cpp b/src/resources/sprite/spritedef.cpp index fc168b53f..59ac9d9f4 100644 --- a/src/resources/sprite/spritedef.cpp +++ b/src/resources/sprite/spritedef.cpp @@ -477,7 +477,7 @@ void SpriteDef::includeSprite(XmlNodeConstPtr includeNode, const int variant) if (filename.empty()) return; - filename = paths.getStringValue("sprites").append(filename); + filename = pathJoin(paths.getStringValue("sprites"), filename); if (mProcessedFiles.find(filename) != mProcessedFiles.end()) { |