From bc3a7cf853510ffe1e42dc683f854d360f6528c7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 30 Nov 2015 13:59:45 +0300 Subject: Add pugixml backend incomplete. Add some defines for xml nodes manipulation. With pugixml backend no xml writing. --- src/resources/db/horsedb.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/resources/db/horsedb.cpp') 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( \ - 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")) -- cgit v1.2.3-70-g09d2