summaryrefslogtreecommitdiff
path: root/src/resources/mapreader.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-12-10 16:46:55 +0300
committerAndrei Karas <akaras@inbox.ru>2016-12-10 16:46:55 +0300
commit608dfae22e1b5145210314ca6c7268420dd639c8 (patch)
tree5f7317be7e895a1f8aede182ea69ef56d456c54f /src/resources/mapreader.cpp
parent9eb389060d44672c311a36348036eab297859e7e (diff)
downloadmanaplus-608dfae22e1b5145210314ca6c7268420dd639c8.tar.gz
manaplus-608dfae22e1b5145210314ca6c7268420dd639c8.tar.bz2
manaplus-608dfae22e1b5145210314ca6c7268420dd639c8.tar.xz
manaplus-608dfae22e1b5145210314ca6c7268420dd639c8.zip
Fix some issues found by automatic checks.
Diffstat (limited to 'src/resources/mapreader.cpp')
-rw-r--r--src/resources/mapreader.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index f0f43d225..215d5c13e 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -327,7 +327,7 @@ Map *MapReader::readMap(XmlNodePtrConst node, const std::string &path)
BLOCK_START("MapReader::readMap xml")
// Take the filename off the path
- const std::string pathDir = path.substr(0, path.rfind("/") + 1);
+ const std::string pathDir = path.substr(0, path.rfind('/') + 1);
const int w = XML::getProperty(node, "width", 0);
const int h = XML::getProperty(node, "height", 0);
@@ -354,7 +354,7 @@ Map *MapReader::readMap(XmlNodePtrConst node, const std::string &path)
w, h,
tilew, tileh);
- const std::string fileName = path.substr(path.rfind("/") + 1);
+ const std::string fileName = path.substr(path.rfind('/') + 1);
map->setProperty("shortName", fileName);
#ifdef USE_OPENGL
@@ -800,7 +800,7 @@ bool MapReader::readCsvLayer(const XmlNodePtrConst childNode,
{
while (oldPos != csv.npos)
{
- const size_t pos = csv.find_first_of(",", oldPos);
+ const size_t pos = csv.find_first_of(',', oldPos);
if (pos == csv.npos)
return false;
@@ -830,7 +830,7 @@ bool MapReader::readCsvLayer(const XmlNodePtrConst childNode,
{
while (oldPos != csv.npos)
{
- const size_t pos = csv.find_first_of(",", oldPos);
+ const size_t pos = csv.find_first_of(',', oldPos);
if (pos == csv.npos)
return false;
@@ -1078,7 +1078,7 @@ Tileset *MapReader::readTileset(XmlNodePtr node,
}
// Reset path to be realtive to the tsx file
- pathDir = filename.substr(0, filename.rfind("/") + 1);
+ pathDir = filename.substr(0, filename.rfind('/') + 1);
}
const int tw = XML::getProperty(node, "tilewidth", map->getTileWidth());
@@ -1272,7 +1272,7 @@ Map *MapReader::createEmptyMap(const std::string &restrict filename,
void MapReader::updateMusic(Map *const map)
{
std::string name = map->getProperty("shortName");
- const size_t p = name.rfind(".");
+ const size_t p = name.rfind('.');
if (p != std::string::npos)
name = name.substr(0, p);
name.append(".ogg");