summaryrefslogtreecommitdiffstats
path: root/Source/CPack/WiX/cmWIXSourceWriter.cxx
diff options
context:
space:
mode:
authorPavel Solodovnikov <hellyeahdominate@gmail.com>2017-09-15 22:04:51 (GMT)
committerBrad King <brad.king@kitware.com>2017-09-19 12:06:08 (GMT)
commitf43baf69814176f52b2b229667c4d3e88154bdea (patch)
tree58d8ff3131b492e71be8feb701a013e28f00dd9c /Source/CPack/WiX/cmWIXSourceWriter.cxx
parentc0c5f924fe46fcf83603117689b372cb8520c4bb (diff)
downloadCMake-f43baf69814176f52b2b229667c4d3e88154bdea.zip
CMake-f43baf69814176f52b2b229667c4d3e88154bdea.tar.gz
CMake-f43baf69814176f52b2b229667c4d3e88154bdea.tar.bz2
Meta: modernize old-fashioned loops to range-based `for` (CPack).
Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
Diffstat (limited to 'Source/CPack/WiX/cmWIXSourceWriter.cxx')
-rw-r--r--Source/CPack/WiX/cmWIXSourceWriter.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/Source/CPack/WiX/cmWIXSourceWriter.cxx b/Source/CPack/WiX/cmWIXSourceWriter.cxx
index a86e28d..dc730e0 100644
--- a/Source/CPack/WiX/cmWIXSourceWriter.cxx
+++ b/Source/CPack/WiX/cmWIXSourceWriter.cxx
@@ -158,9 +158,7 @@ std::string cmWIXSourceWriter::EscapeAttributeValue(std::string const& value)
std::string result;
result.reserve(value.size());
- char c = 0;
- for (size_t i = 0; i < value.size(); ++i) {
- c = value[i];
+ for (char c : value) {
switch (c) {
case '<':
result += "&lt;";