summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorRegina Pfeifer <regina@mailbox.org>2019-09-04 20:17:22 (GMT)
committerRegina Pfeifer <regina@mailbox.org>2019-09-10 20:21:41 (GMT)
commitd25a5a7ec91bfa072d3cf1a302830a54506c88c0 (patch)
treed06203c8e5b5fdd38645e0fb9b284ded26651f44 /Source/cmLocalUnixMakefileGenerator3.cxx
parentbbf48c494ad28d1c8ac5aa6e4cecb35c2cbf1b84 (diff)
downloadCMake-d25a5a7ec91bfa072d3cf1a302830a54506c88c0.zip
CMake-d25a5a7ec91bfa072d3cf1a302830a54506c88c0.tar.gz
CMake-d25a5a7ec91bfa072d3cf1a302830a54506c88c0.tar.bz2
clang-tidy: modernize-use-auto
Set the MinTypeNameLength option to an impossibly high value in order to limit the diagnostics to iterators. Leave new expressions and cast expressions for later.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 320a58b..8248608 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1225,8 +1225,7 @@ std::string cmLocalUnixMakefileGenerator3::CreateMakeVariable(
// see if the variable has been defined before and return
// the modified version of the variable
- std::map<std::string, std::string>::iterator i =
- this->MakeVariableMap.find(unmodified);
+ auto i = this->MakeVariableMap.find(unmodified);
if (i != this->MakeVariableMap.end()) {
return i->second;
}
@@ -1495,8 +1494,7 @@ void cmLocalUnixMakefileGenerator3::CheckMultipleOutputs(bool verbose)
// Convert the string to a list and preserve empty entries.
std::vector<std::string> pairs = cmExpandedList(pairs_string, true);
- for (std::vector<std::string>::const_iterator i = pairs.begin();
- i != pairs.end() && (i + 1) != pairs.end();) {
+ for (auto i = pairs.begin(); i != pairs.end() && (i + 1) != pairs.end();) {
const std::string& depender = *i++;
const std::string& dependee = *i++;
@@ -2019,10 +2017,9 @@ std::string cmLocalUnixMakefileGenerator3::ConvertToQuotedOutputPath(
if (components.size() > 1) {
// Now add the rest of the components separated by the proper slash
// direction for this platform.
- std::vector<std::string>::const_iterator compEnd = std::remove(
- components.begin() + 1, components.end() - 1, std::string());
- std::vector<std::string>::const_iterator compStart =
- components.begin() + 1;
+ auto compEnd = std::remove(components.begin() + 1, components.end() - 1,
+ std::string());
+ auto compStart = components.begin() + 1;
result += cmJoin(cmMakeRange(compStart, compEnd), slash);
// Only the last component can be empty to avoid double slashes.
result += slash;