diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-11-30 13:59:45 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-01-20 21:58:39 +0300 |
commit | bc3a7cf853510ffe1e42dc683f854d360f6528c7 (patch) | |
tree | 9898f13eafc3e1a20388d8d592bfcc05c8f50ba7 /src/resources/db/horsedb.cpp | |
parent | a058af57bddd4a4394401cc75d33461e17aab8c1 (diff) | |
download | manaplus-bc3a7cf853510ffe1e42dc683f854d360f6528c7.tar.gz manaplus-bc3a7cf853510ffe1e42dc683f854d360f6528c7.tar.bz2 manaplus-bc3a7cf853510ffe1e42dc683f854d360f6528c7.tar.xz manaplus-bc3a7cf853510ffe1e42dc683f854d360f6528c7.zip |
Add pugixml backend incomplete.
Add some defines for xml nodes manipulation.
With pugixml backend no xml writing.
Diffstat (limited to 'src/resources/db/horsedb.cpp')
-rw-r--r-- | src/resources/db/horsedb.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/resources/db/horsedb.cpp b/src/resources/db/horsedb.cpp index 011548b1f..27987c657 100644 --- a/src/resources/db/horsedb.cpp +++ b/src/resources/db/horsedb.cpp @@ -42,8 +42,7 @@ namespace { \ SpriteReference *const currentSprite = new SpriteReference; \ currentSprite->sprite = paths.getStringValue("sprites").append( \ - std::string(reinterpret_cast<const char*>( \ - spriteNode->xmlChildrenNode->content))); \ + std::string(XmlChildContent(spriteNode))); \ currentSprite->variant = XML::getProperty( \ spriteNode, "variant", 0); \ currentInfo->name.push_back(currentSprite); \ @@ -142,7 +141,7 @@ void HorseDB::loadXmlFile(const std::string &fileName) for_each_xml_child_node(spriteNode, horseNode) { - if (!spriteNode->xmlChildrenNode) + if (!XmlHaveChildContent(spriteNode)) continue; if (xmlNameEqual(spriteNode, "sprite")) @@ -162,7 +161,7 @@ static void loadDownSprites(XmlNodePtrConst parentNode, { for_each_xml_child_node(spriteNode, parentNode) { - if (!spriteNode->xmlChildrenNode) + if (!XmlHaveChildContent(spriteNode)) continue; if (xmlNameEqual(spriteNode, "sprite")) @@ -175,7 +174,7 @@ static void loadUpSprites(XmlNodePtrConst parentNode, { for_each_xml_child_node(spriteNode, parentNode) { - if (!spriteNode->xmlChildrenNode) + if (!XmlHaveChildContent(spriteNode)) continue; if (xmlNameEqual(spriteNode, "sprite")) |