diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2018-12-21 22:46:10 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2018-12-21 22:46:10 +0000 |
commit | 8d20cfdfc6c26533a87c525cb6e8dbc50a65e036 (patch) | |
tree | 9cc24b8bbe759b58af831d12959270bcfdb88725 /lldb/source/Host/common/XML.cpp | |
parent | b42963716801ac344dbc8efdfe42f4a2ff7b0b99 (diff) | |
download | bcm5719-llvm-8d20cfdfc6c26533a87c525cb6e8dbc50a65e036.tar.gz bcm5719-llvm-8d20cfdfc6c26533a87c525cb6e8dbc50a65e036.zip |
[NFC] Replace `compare` with (in)equality operator where applicable.
Using compare is verbose, bug prone and potentially inefficient (because
of early termination). Replace relevant call sites with the (in)equality
operator.
llvm-svn: 349972
Diffstat (limited to 'lldb/source/Host/common/XML.cpp')
-rw-r--r-- | lldb/source/Host/common/XML.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Host/common/XML.cpp b/lldb/source/Host/common/XML.cpp index b964a2e26fa..967a294cbf7 100644 --- a/lldb/source/Host/common/XML.cpp +++ b/lldb/source/Host/common/XML.cpp @@ -438,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(); |