Meta: modernize old-fashioned loops to range-based for.

Changes done via `clang-tidy` with some manual fine-tuning
for the variable naming and `auto` type deduction
where appropriate.
This commit is contained in:
Pavel Solodovnikov
2017-09-11 13:40:26 +03:00
parent 00975e9261
commit 7d5095796a
133 changed files with 2453 additions and 3589 deletions

View File

@@ -41,12 +41,11 @@ std::string cmTargetCompileDefinitionsCommand::Join(
{
std::string defs;
std::string sep;
for (std::vector<std::string>::const_iterator it = content.begin();
it != content.end(); ++it) {
if (cmHasLiteralPrefix(it->c_str(), "-D")) {
defs += sep + it->substr(2);
for (std::string const& it : content) {
if (cmHasLiteralPrefix(it.c_str(), "-D")) {
defs += sep + it.substr(2);
} else {
defs += sep + *it;
defs += sep + it;
}
sep = ";";
}