mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
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:
@@ -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 = ";";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user