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/Interpreter/CommandAlias.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/Interpreter/CommandAlias.cpp')
| -rw-r--r-- | lldb/source/Interpreter/CommandAlias.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/CommandAlias.cpp b/lldb/source/Interpreter/CommandAlias.cpp index a4b0a0c55c0..078eb73a7a8 100644 --- a/lldb/source/Interpreter/CommandAlias.cpp +++ b/lldb/source/Interpreter/CommandAlias.cpp @@ -158,8 +158,7 @@ void CommandAlias::GetAliasExpansion(StreamString &help_string) const { help_string.Printf(" %s", value.c_str()); } else { help_string.Printf(" %s", opt.c_str()); - if ((value.compare("<no-argument>") != 0) && - (value.compare("<need-argument") != 0)) { + if ((value != "<no-argument>") && (value != "<need-argument")) { help_string.Printf(" %s", value.c_str()); } } |

