From 5edddb1313ed0dc275e6ae70b8a1780ded3a590d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 10 Jan 2012 21:06:33 +0300 Subject: Replace xmlStrEqual to xmlNameEqual. --- src/configuration.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/configuration.cpp') diff --git a/src/configuration.cpp b/src/configuration.cpp index 957fa1798..b3d5d77d0 100644 --- a/src/configuration.cpp +++ b/src/configuration.cpp @@ -432,7 +432,7 @@ void ConfigurationObject::initFromXML(XmlNodePtr parent_node) for_each_xml_child_node(node, parent_node) { - if (xmlStrEqual(node->name, BAD_CAST "list")) + if (xmlNameEqual(node, "list")) { // list option handling @@ -440,7 +440,7 @@ void ConfigurationObject::initFromXML(XmlNodePtr parent_node) for_each_xml_child_node(subnode, node) { - if (xmlStrEqual(subnode->name, BAD_CAST name.c_str()) + if (xmlNameEqual(subnode, name.c_str()) && subnode->type == XML_ELEMENT_NODE) { ConfigurationObject *cobj = new ConfigurationObject; @@ -452,7 +452,7 @@ void ConfigurationObject::initFromXML(XmlNodePtr parent_node) } } - else if (xmlStrEqual(node->name, BAD_CAST "option")) + else if (xmlNameEqual(node, "option")) { // single option handling @@ -491,7 +491,7 @@ void Configuration::init(const std::string &filename, bool useResManager) XmlNodePtr rootNode = doc.rootNode(); - if (!rootNode || !xmlStrEqual(rootNode->name, BAD_CAST "configuration")) + if (!rootNode || !xmlNameEqual(rootNode, "configuration")) { logger->log("Warning: No configuration file (%s)", filename.c_str()); return; -- cgit v1.2.3-70-g09d2