mirror of
https://github.com/NixOS/nix
synced 2025-06-28 22:01:15 +02:00
OCD: foreach -> C++11 ranged for
This commit is contained in:
parent
1511aa9f48
commit
6bd2c7bb38
30 changed files with 849 additions and 874 deletions
|
@ -1060,9 +1060,9 @@ template vector<string> tokenizeString(const string & s, const string & separato
|
|||
string concatStringsSep(const string & sep, const Strings & ss)
|
||||
{
|
||||
string s;
|
||||
foreach (Strings::const_iterator, i, ss) {
|
||||
for (auto & i : ss) {
|
||||
if (s.size() != 0) s += sep;
|
||||
s += *i;
|
||||
s += i;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
@ -1071,9 +1071,9 @@ string concatStringsSep(const string & sep, const Strings & ss)
|
|||
string concatStringsSep(const string & sep, const StringSet & ss)
|
||||
{
|
||||
string s;
|
||||
foreach (StringSet::const_iterator, i, ss) {
|
||||
for (auto & i : ss) {
|
||||
if (s.size() != 0) s += sep;
|
||||
s += *i;
|
||||
s += i;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue