From 3dbdda0d3070a093f8a341f897ce4310a8b52bd2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 7 Mar 2016 18:37:50 +0300 Subject: Add some missing nonnull attributes to map/maplayer classes. --- src/resources/mapreader.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/resources/mapreader.cpp') 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 -- cgit v1.2.3-70-g09d2