summaryrefslogtreecommitdiffstats
path: root/Source/cmCPackPropertiesGenerator.cxx
diff options
context:
space:
mode:
authorPavel Solodovnikov <hellyeahdominate@gmail.com>2017-09-11 10:40:26 (GMT)
committerPavel Solodovnikov <hellyeahdominate@gmail.com>2017-09-12 13:22:47 (GMT)
commit7d5095796ab616cf9b709036387bb95ab9984141 (patch)
treec010e922adad95ef86ab4a3ac2a3abd63e9f33ef /Source/cmCPackPropertiesGenerator.cxx
parent00975e926199eea21763470e2ab876246e36669a (diff)
downloadCMake-7d5095796ab616cf9b709036387bb95ab9984141.zip
CMake-7d5095796ab616cf9b709036387bb95ab9984141.tar.gz
CMake-7d5095796ab616cf9b709036387bb95ab9984141.tar.bz2
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.
Diffstat (limited to 'Source/cmCPackPropertiesGenerator.cxx')
-rw-r--r--Source/cmCPackPropertiesGenerator.cxx15
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/cmCPackPropertiesGenerator.cxx b/Source/cmCPackPropertiesGenerator.cxx
index 57a8b38..a33b824 100644
--- a/Source/cmCPackPropertiesGenerator.cxx
+++ b/Source/cmCPackPropertiesGenerator.cxx
@@ -6,7 +6,6 @@
#include <map>
#include <ostream>
-#include <utility>
cmCPackPropertiesGenerator::cmCPackPropertiesGenerator(
cmLocalGenerator* lg, cmInstalledFile const& installedFile,
@@ -27,19 +26,17 @@ void cmCPackPropertiesGenerator::GenerateScriptForConfig(
cmInstalledFile::PropertyMapType const& properties =
this->InstalledFile.GetProperties();
- for (cmInstalledFile::PropertyMapType::const_iterator i = properties.begin();
- i != properties.end(); ++i) {
- std::string const& name = i->first;
- cmInstalledFile::Property const& property = i->second;
+ for (cmInstalledFile::PropertyMapType::value_type const& i : properties) {
+ std::string const& name = i.first;
+ cmInstalledFile::Property const& property = i.second;
os << indent << "set_property(INSTALL "
<< cmOutputConverter::EscapeForCMake(expandedFileName) << " PROPERTY "
<< cmOutputConverter::EscapeForCMake(name);
- for (cmInstalledFile::ExpressionVectorType::const_iterator j =
- property.ValueExpressions.begin();
- j != property.ValueExpressions.end(); ++j) {
- std::string value = (*j)->Evaluate(this->LG, config);
+ for (cmInstalledFile::ExpressionVectorType::value_type const& j :
+ property.ValueExpressions) {
+ std::string value = j->Evaluate(this->LG, config);
os << " " << cmOutputConverter::EscapeForCMake(value);
}