summaryrefslogtreecommitdiff
path: root/src/resources/mapreader.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-07 18:37:50 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-07 18:37:50 +0300
commit3dbdda0d3070a093f8a341f897ce4310a8b52bd2 (patch)
treeddb5a48767c97cbb95e8204acfeb667483477051 /src/resources/mapreader.cpp
parent3173688b7c1a1027257aa057039bd50738ac8bb5 (diff)
downloadmanaplus-3dbdda0d3070a093f8a341f897ce4310a8b52bd2.tar.gz
manaplus-3dbdda0d3070a093f8a341f897ce4310a8b52bd2.tar.bz2
manaplus-3dbdda0d3070a093f8a341f897ce4310a8b52bd2.tar.xz
manaplus-3dbdda0d3070a093f8a341f897ce4310a8b52bd2.zip
Add some missing nonnull attributes to map/maplayer classes.
Diffstat (limited to 'src/resources/mapreader.cpp')
-rw-r--r--src/resources/mapreader.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 6078d8d7e..555185094 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -295,7 +295,10 @@ void MapReader::unloadTempLayers()
mKnownDocs.clear();
}
-static void loadReplaceLayer(const LayerInfoIterator &it, Map *const map)
+static void loadReplaceLayer(const LayerInfoIterator &it,
+ Map *const map) A_NONNULL(2);
+static void loadReplaceLayer(const LayerInfoIterator &it,
+ Map *const map)
{
MapReader::readLayer((*it).second, map);
}
@@ -604,7 +607,7 @@ bool MapReader::readBase64Layer(const XmlNodePtrConst childNode,
int &restrict x, int &restrict y,
const int w, const int h)
{
- if (!map || !childNode)
+ if (!childNode)
return false;
if (!compression.empty() && compression != "gzip"
@@ -707,7 +710,7 @@ bool MapReader::readCsvLayer(const XmlNodePtrConst childNode,
int &restrict x, int &restrict y,
const int w, const int h)
{
- if (!map || !childNode)
+ if (!childNode)
return false;
if (!XmlHaveChildContent(childNode))
@@ -751,7 +754,7 @@ bool MapReader::readCsvLayer(const XmlNodePtrConst childNode,
void MapReader::readLayer(const XmlNodePtr node, Map *const map)
{
- if (!map || !node)
+ if (!node)
return;
// Layers are not necessarily the same size as the map