summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectApropos.cpp
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2019-08-19 07:59:44 +0000
committerRaphael Isemann <teemperor@gmail.com>2019-08-19 07:59:44 +0000
commit81094aad617468208084b574ed7063ed7af7b227 (patch)
tree245df4d2918d3b4e522992ff693d152a9af5ae3d /lldb/source/Commands/CommandObjectApropos.cpp
parentb127771f7d2972acad81550e03cc4e1e3c1fcd1c (diff)
downloadbcm5719-llvm-81094aad617468208084b574ed7063ed7af7b227.tar.gz
bcm5719-llvm-81094aad617468208084b574ed7063ed7af7b227.zip
[lldb][NFC] Use GetMaxStringLength in CommandObjectApropos::DoExecute
llvm-svn: 369240
Diffstat (limited to 'lldb/source/Commands/CommandObjectApropos.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectApropos.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/lldb/source/Commands/CommandObjectApropos.cpp b/lldb/source/Commands/CommandObjectApropos.cpp
index d336a1652a9..b0ef03acd61 100644
--- a/lldb/source/Commands/CommandObjectApropos.cpp
+++ b/lldb/source/Commands/CommandObjectApropos.cpp
@@ -63,11 +63,7 @@ bool CommandObjectApropos::DoExecute(Args &args, CommandReturnObject &result) {
if (commands_found.GetSize() > 0) {
result.AppendMessageWithFormat(
"The following commands may relate to '%s':\n", args[0].c_str());
- size_t max_len = 0;
-
- for (const std::string &command : commands_found) {
- max_len = std::max(max_len, command.size());
- }
+ const size_t max_len = commands_found.GetMaxStringLength();
for (size_t i = 0; i < commands_found.GetSize(); ++i)
m_interpreter.OutputFormattedHelpText(
OpenPOWER on IntegriCloud