diff options
author | Sean Callanan <scallanan@apple.com> | 2012-08-09 00:50:26 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2012-08-09 00:50:26 +0000 |
commit | 9a028519e8e759ecd5157fa8e7bdadae6da54651 (patch) | |
tree | 8fec32c5a99b2cff7cd3a8e150e6f6a5b2974cdb /lldb/source/Interpreter/CommandInterpreter.cpp | |
parent | 33baca29e53d781f3b1d2fb908079afd7da865b9 (diff) | |
download | bcm5719-llvm-9a028519e8e759ecd5157fa8e7bdadae6da54651.tar.gz bcm5719-llvm-9a028519e8e759ecd5157fa8e7bdadae6da54651.zip |
Removed explicit NULL checks for shared pointers
and instead made us use implicit casts to bool.
This generated a warning in C++11.
<rdar://problem/11930775>
llvm-svn: 161559
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandInterpreter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index 9c6f722d7ef..a7c63e7ea64 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -464,7 +464,7 @@ CommandInterpreter::GetCommandSP (const char *cmd_cstr, bool include_aliases, bo ret_val = pos->second; } - if (!exact && ret_val == NULL) + if (!exact && !ret_val) { // We will only get into here if we didn't find any exact matches. @@ -534,7 +534,7 @@ CommandInterpreter::GetCommandSP (const char *cmd_cstr, bool include_aliases, bo return user_match_sp; } } - else if (matches && ret_val != NULL) + else if (matches && ret_val) { matches->AppendString (cmd_cstr); } @@ -762,7 +762,7 @@ CommandInterpreter::GetAliasHelp (const char *alias_name, const char *command_na help_string.Printf ("'%s", command_name); OptionArgVectorSP option_arg_vector_sp = GetAliasOptions (alias_name); - if (option_arg_vector_sp != NULL) + if (option_arg_vector_sp) { OptionArgVector *options = option_arg_vector_sp.get(); for (int i = 0; i < options->size(); ++i) @@ -1936,7 +1936,7 @@ CommandInterpreter::CrossRegisterCommand (const char * dest_cmd, const char * ob { CommandObjectSP cmd_obj_sp = GetCommandSPExact (dest_cmd, true); - if (cmd_obj_sp != NULL) + if (cmd_obj_sp) { CommandObject *cmd_obj = cmd_obj_sp.get(); if (cmd_obj->IsCrossRefObject ()) |