aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectHelp.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2022-12-18 01:15:25 +0000
committerFangrui Song <i@maskray.me>2022-12-18 01:15:25 +0000
commitfbaf48be0ff6fb24b9aa8fe9c2284fe88a8798dd (patch)
tree735c071463e87ff80c30d1bb2b4528fc8aa1a8a9 /lldb/source/Commands/CommandObjectHelp.cpp
parenta3400191137e7c991b89ebe72211790dae1648a1 (diff)
downloadllvm-fbaf48be0ff6fb24b9aa8fe9c2284fe88a8798dd.zip
llvm-fbaf48be0ff6fb24b9aa8fe9c2284fe88a8798dd.tar.gz
llvm-fbaf48be0ff6fb24b9aa8fe9c2284fe88a8798dd.tar.bz2
[lldb] Remove redundant .c_str() and .get() calls
Removing .c_str() has a semantics difference, but the use scenarios likely do not matter as we don't have NUL in the strings.
Diffstat (limited to 'lldb/source/Commands/CommandObjectHelp.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectHelp.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lldb/source/Commands/CommandObjectHelp.cpp b/lldb/source/Commands/CommandObjectHelp.cpp
index c7a3bce1..da5dae7 100644
--- a/lldb/source/Commands/CommandObjectHelp.cpp
+++ b/lldb/source/Commands/CommandObjectHelp.cpp
@@ -145,15 +145,15 @@ bool CommandObjectHelp::DoExecute(Args &command, CommandReturnObject &result) {
return false;
} else if (!sub_cmd_obj) {
StreamString error_msg_stream;
- GenerateAdditionalHelpAvenuesMessage(
- &error_msg_stream, cmd_string.c_str(),
- m_interpreter.GetCommandPrefix(), sub_command.c_str());
+ GenerateAdditionalHelpAvenuesMessage(&error_msg_stream, cmd_string,
+ m_interpreter.GetCommandPrefix(),
+ sub_command);
result.AppendError(error_msg_stream.GetString());
return false;
} else {
GenerateAdditionalHelpAvenuesMessage(
- &result.GetOutputStream(), cmd_string.c_str(),
- m_interpreter.GetCommandPrefix(), sub_command.c_str());
+ &result.GetOutputStream(), cmd_string,
+ m_interpreter.GetCommandPrefix(), sub_command);
result.GetOutputStream().Printf(
"\nThe closest match is '%s'. Help on it follows.\n\n",
sub_cmd_obj->GetCommandName().str().c_str());