diff options
| author | 2021-04-06 20:06:18 +0100 | |
|---|---|---|
| committer | 2021-04-07 10:36:11 +0100 | |
| commit | 942fd2bcfd384a12c900999fe663202c87319a68 (patch) | |
| tree | c2bad1906af27afbc3c7d96c3e5ca3c27c83f090 /src/command_parse.cpp | |
| parent | Merge branch 'insp3' into master. (diff) | |
Switch simple iterator loops to use range-based for loops.
Diffstat (limited to 'src/command_parse.cpp')
| -rw-r--r-- | src/command_parse.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp index c367271c4..ae543a0a8 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -238,10 +238,10 @@ void CommandParser::ProcessCommand(LocalUser* user, std::string& command, Comman const CommandBase::Params::iterator firstexcess = lastkeep + 1; // Append all excess parameter(s) to the last parameter, separated by spaces - for (CommandBase::Params::const_iterator i = firstexcess; i != command_p.end(); ++i) + for (const auto& param : insp::iterator_range(firstexcess, command_p.end())) { lastkeep->push_back(' '); - lastkeep->append(*i); + lastkeep->append(param); } // Erase the excess parameter(s) |
