Skip to content

Commit 2835765

Browse files
committed
Use structured binding
1 parent 738c182 commit 2835765

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lldb/include/lldb/Interpreter/CommandObject.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ int AddNamesMatchingPartialString(
4040
StringList *descriptions = nullptr) {
4141
int number_added = 0;
4242

43-
for (const auto &iter : in_map) {
44-
llvm::StringRef full_cmd = iter.first;
45-
if (full_cmd.starts_with(cmd_str)) {
43+
for (const auto &[name, cmd] : in_map) {
44+
llvm::StringRef cmd_name = name;
45+
if (cmd_name.starts_with(cmd_str)) {
4646
++number_added;
47-
matches.AppendString(iter.first);
47+
matches.AppendString(name);
4848
if (descriptions)
49-
descriptions->AppendString(iter.second->GetHelp());
49+
descriptions->AppendString(cmd->GetHelp());
5050
}
5151
}
5252

0 commit comments

Comments
 (0)