diff options
Diffstat (limited to 'Source/cmStringCommand.cxx')
-rw-r--r-- | Source/cmStringCommand.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx index 592f66e..3b6a7ee 100644 --- a/Source/cmStringCommand.cxx +++ b/Source/cmStringCommand.cxx @@ -412,13 +412,13 @@ bool cmStringCommand::RegexReplace(std::vector<std::string> const& args) } // Concatenate the replacement for the match. - for (unsigned int i = 0; i < replacement.size(); ++i) { - if (replacement[i].number < 0) { + for (RegexReplacement const& i : replacement) { + if (i.number < 0) { // This is just a plain-text part of the replacement. - output += replacement[i].value; + output += i.value; } else { // Replace with part of the match. - int n = replacement[i].number; + int n = i.number; std::string::size_type start = re.start(n); std::string::size_type end = re.end(n); std::string::size_type len = input.length() - base; |