diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-05-12 00:18:57 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-05-12 00:51:22 +0300 |
commit | d5a00a320043f5782ebc489285c89943b667e094 (patch) | |
tree | eb64f3b1f81f7ba2a3c7ff9e02ad329ef21abb83 /src/resources/mapreader.cpp | |
parent | 742b2a22bdcb69e6f615a284065ba2696e7bc261 (diff) | |
download | manaplus-d5a00a320043f5782ebc489285c89943b667e094.tar.gz manaplus-d5a00a320043f5782ebc489285c89943b667e094.tar.bz2 manaplus-d5a00a320043f5782ebc489285c89943b667e094.tar.xz manaplus-d5a00a320043f5782ebc489285c89943b667e094.zip |
Add skipError parameter to loadXml functions.
This allow not show errors for some not main xml files.
Diffstat (limited to 'src/resources/mapreader.cpp')
-rw-r--r-- | src/resources/mapreader.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index 497817a7d..7c3c0a2ca 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -205,11 +205,12 @@ int inflateMemory(unsigned char *restrict const in, return outLength; } -void MapReader::addLayerToList(const std::string &fileName) +void MapReader::addLayerToList(const std::string &fileName, + const SkipError skipError) { XML::Document *doc = new XML::Document(fileName, UseResman_true, - SkipError_false); + skipError); XmlNodePtrConst node = doc->rootNode(); if (!node) { @@ -283,7 +284,7 @@ Map *MapReader::readMap(const std::string &restrict filename, void MapReader::loadLayers(const std::string &path) { BLOCK_START("MapReader::loadLayers") - loadXmlDir2(path, addLayerToList, ".tmx"); + loadXmlDir2(path, addLayerToList, ".tmx", SkipError_false); BLOCK_END("MapReader::loadLayers") } |