diff options
author | Pavel Solodovnikov <hellyeahdominate@gmail.com> | 2017-09-11 10:40:26 (GMT) |
---|---|---|
committer | Pavel Solodovnikov <hellyeahdominate@gmail.com> | 2017-09-12 13:22:47 (GMT) |
commit | 7d5095796ab616cf9b709036387bb95ab9984141 (patch) | |
tree | c010e922adad95ef86ab4a3ac2a3abd63e9f33ef /Source/cmRST.cxx | |
parent | 00975e926199eea21763470e2ab876246e36669a (diff) | |
download | CMake-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/cmRST.cxx')
-rw-r--r-- | Source/cmRST.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx index 5364f76..783e308 100644 --- a/Source/cmRST.cxx +++ b/Source/cmRST.cxx @@ -292,9 +292,7 @@ std::string cmRST::ReplaceSubstitutions(std::string const& line) void cmRST::OutputMarkupLines(bool inlineMarkup) { - for (std::vector<std::string>::iterator i = this->MarkupLines.begin(); - i != this->MarkupLines.end(); ++i) { - std::string line = *i; + for (auto line : this->MarkupLines) { if (!line.empty()) { line = " " + line; } @@ -353,9 +351,7 @@ void cmRST::ProcessDirectiveReplace() void cmRST::ProcessDirectiveTocTree() { // Process documents referenced by toctree directive. - for (std::vector<std::string>::iterator i = this->MarkupLines.begin(); - i != this->MarkupLines.end(); ++i) { - std::string const& line = *i; + for (std::string const& line : this->MarkupLines) { if (!line.empty() && line[0] != ':') { if (this->TocTreeLink.find(line)) { std::string const& link = this->TocTreeLink.match(1); |