summaryrefslogtreecommitdiff
path: root/src/resources/mapreader.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2020-02-23 09:30:51 +0300
committerAndrei Karas <akaras@inbox.ru>2020-02-23 09:30:51 +0300
commit1e2a88e975019929c4c7e3154537865cc09550a6 (patch)
treeae8bc68ad3a3f6b61a5e2d511d7fc17daa22bd0e /src/resources/mapreader.cpp
parent6941fd4eeb1dce20aba8c42fd030c2690c37b731 (diff)
downloadplus-1e2a88e975019929c4c7e3154537865cc09550a6.tar.gz
plus-1e2a88e975019929c4c7e3154537865cc09550a6.tar.bz2
plus-1e2a88e975019929c4c7e3154537865cc09550a6.tar.xz
plus-1e2a88e975019929c4c7e3154537865cc09550a6.zip
Fix some code style issues
Diffstat (limited to 'src/resources/mapreader.cpp')
-rw-r--r--src/resources/mapreader.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index d697dc215..e8f1927b8 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -1196,10 +1196,10 @@ Tileset *MapReader::readTileset(XmlNodePtr node,
haveAnimation = true;
const std::string name = XML::getProperty(
propertyNode, "name", "");
- const int value = XML::getProperty(
- propertyNode, "value", 0);
if (!name.empty())
{
+ const int value = XML::getProperty(
+ propertyNode, "value", 0);
tileProperties[name] = value;
logger->log("Tile Prop of %d \"%s\" = \"%d\"",
tileGID, name.c_str(), value);
@@ -1241,13 +1241,13 @@ Tileset *MapReader::readTileset(XmlNodePtr node,
if (!xmlNameEqual(frameNode, "frame"))
continue;
- const int tileId = XML::getProperty(
- frameNode, "tileid", 0);
- const int duration = XML::getProperty(
- frameNode, "duration", 0) / 10;
-
if (set != nullptr)
{
+ const int tileId = XML::getProperty(
+ frameNode, "tileid", 0);
+ const int duration = XML::getProperty(
+ frameNode, "duration", 0) / 10;
+
ani->addFrame(set->get(tileId),
duration,
0, 0, 100);