summaryrefslogtreecommitdiff
path: root/source/Host/common/XML.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Host/common/XML.cpp')
-rw-r--r--source/Host/common/XML.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/source/Host/common/XML.cpp b/source/Host/common/XML.cpp
index 7468a3d7ac65..967a294cbf72 100644
--- a/source/Host/common/XML.cpp
+++ b/source/Host/common/XML.cpp
@@ -201,8 +201,7 @@ void XMLNode::ForEachAttribute(AttributeCallback const &callback) const {
llvm::StringRef attr_value;
if (child->content)
attr_value = llvm::StringRef((const char *)child->content);
- if (callback(llvm::StringRef((const char *)attr->name), attr_value) ==
- false)
+ if (!callback(llvm::StringRef((const char *)attr->name), attr_value))
return;
}
}
@@ -217,7 +216,7 @@ void XMLNode::ForEachSiblingNode(NodeCallback const &callback) const {
if (IsValid()) {
// iterate through all siblings
for (xmlNodePtr node = m_node; node; node = node->next) {
- if (callback(XMLNode(node)) == false)
+ if (!callback(XMLNode(node)))
return;
}
}
@@ -234,7 +233,7 @@ void XMLNode::ForEachSiblingElement(NodeCallback const &callback) const {
if (node->type != XML_ELEMENT_NODE)
continue;
- if (callback(XMLNode(node)) == false)
+ if (!callback(XMLNode(node)))
return;
}
}
@@ -263,7 +262,7 @@ void XMLNode::ForEachSiblingElementWithName(
// ignore this one
}
- if (callback(XMLNode(node)) == false)
+ if (!callback(XMLNode(node)))
return;
}
}
@@ -439,7 +438,7 @@ XMLNode ApplePropertyList::GetValueNode(const char *key) const {
"key", [key, &value_node](const XMLNode &key_node) -> bool {
std::string key_name;
if (key_node.GetElementText(key_name)) {
- if (key_name.compare(key) == 0) {
+ if (key_name == key) {
value_node = key_node.GetSibling();
while (value_node && !value_node.IsElement())
value_node = value_node.GetSibling();