Convert more loops to range-based for-loops

This commit is contained in:
Vitaly Stakhovsky 2020-03-09 12:00:00 -04:00 committed by Brad King
parent 9296cd0551
commit cbbca9ee2a
2 changed files with 5 additions and 6 deletions

View File

@ -2914,11 +2914,11 @@ void cmLocalGenerator::JoinDefines(const std::set<std::string>& defines,
// command line without any escapes. However we still have to
// get the '$' and '#' characters through WMake as '$$' and
// '$#'.
for (const char* c = define.c_str(); *c; ++c) {
if (*c == '$' || *c == '#') {
for (char c : define) {
if (c == '$' || c == '#') {
def += '$';
}
def += *c;
def += c;
}
} else {
// Make the definition appear properly on the command line. Use

View File

@ -1510,10 +1510,9 @@ cmLocalVisualStudio7GeneratorFCInfo::cmLocalVisualStudio7GeneratorFCInfo(
if (const char* deps = sf.GetProperty("OBJECT_DEPENDS")) {
std::vector<std::string> depends = cmExpandedList(deps);
const char* sep = "";
for (std::vector<std::string>::iterator j = depends.begin();
j != depends.end(); ++j) {
for (const std::string& d : depends) {
fc.AdditionalDeps += sep;
fc.AdditionalDeps += lg->ConvertToXMLOutputPath(*j);
fc.AdditionalDeps += lg->ConvertToXMLOutputPath(d);
sep = ";";
needfc = true;
}