diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-11-08 00:44:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-11-08 00:44:17 +0300 |
commit | 4cea2a5cd85b8d3ad905eb3b337b28284c62d4fe (patch) | |
tree | 714897eca03fbcb764f5b450a29cc1aef8d33433 /src/resources/mapreader.cpp | |
parent | 9e83411f7e4147d09af5a5006888dcc187ea0ef8 (diff) | |
download | manaplus-4cea2a5cd85b8d3ad905eb3b337b28284c62d4fe.tar.gz manaplus-4cea2a5cd85b8d3ad905eb3b337b28284c62d4fe.tar.bz2 manaplus-4cea2a5cd85b8d3ad905eb3b337b28284c62d4fe.tar.xz manaplus-4cea2a5cd85b8d3ad905eb3b337b28284c62d4fe.zip |
Fix more gcc 4.7 warnings.
Diffstat (limited to 'src/resources/mapreader.cpp')
-rw-r--r-- | src/resources/mapreader.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index a6e1074f3..68d39f0ae 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -251,7 +251,7 @@ Map *MapReader::readMap(const std::string &filename, Map *MapReader::readMap(xmlNodePtr node, const std::string &path) { if (!node) - return 0; + return nullptr; // Take the filename off the path const std::string pathDir = path.substr(0, path.rfind("/") + 1); @@ -270,7 +270,7 @@ Map *MapReader::readMap(xmlNodePtr node, const std::string &path) logger->log("MapReader: Warning: " "Unitialized tile width or height value for map: %s", path.c_str()); - return 0; + return nullptr; } Map *map = new Map(w, h, tilew, tileh); @@ -405,7 +405,7 @@ inline static void setTile(Map *map, MapLayer *layer, int x, int y, int gid) if (layer) { // Set regular tile on a layer - Image * const img = set ? set->get(gid - set->getFirstGid()) : 0; + Image * const img = set ? set->get(gid - set->getFirstGid()) : nullptr; layer->setTile(x, y, img); } else @@ -458,7 +458,7 @@ void MapReader::readLayer(xmlNodePtr node, Map *map) map->indexTilesets(); - MapLayer *layer = 0; + MapLayer *layer = nullptr; if (!isCollisionLayer) { @@ -668,7 +668,7 @@ Tileset *MapReader::readTileset(xmlNodePtr node, const std::string &path, doc = new XML::Document(filename); node = doc->rootNode(); if (!node) - return 0; + return nullptr; // Reset path to be realtive to the tsx file pathDir = filename.substr(0, filename.rfind("/") + 1); @@ -760,7 +760,7 @@ Tileset *MapReader::readTileset(xmlNodePtr node, const std::string &path, else { delete ani; - ani = 0; + ani = nullptr; } } } |