From 2dd14c0b4ca2e43a03ae62471f2947149594fc8d Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 25 Feb 2017 15:20:18 -0500 Subject: [PATCH] Cleanup: Greater use of const --- src/Rules.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Rules.cpp b/src/Rules.cpp index 1744aab8..06b27167 100644 --- a/src/Rules.cpp +++ b/src/Rules.cpp @@ -220,7 +220,7 @@ void Rules::set (const std::string& key, const std::string& value) std::vector Rules::all (const std::string& stem) const { std::vector items; - for (auto& it : _settings) + for (const auto& it : _settings) if (stem == "" || it.first.find (stem) == 0) items.push_back (it.first); @@ -245,7 +245,7 @@ std::string Rules::dump () const << '\n'; out << " Settings\n"; - for (auto& item : _settings) + for (const auto& item : _settings) out << " " << item.first << "=" << item.second << '\n'; return out.str (); @@ -396,7 +396,7 @@ void Rules::parseRuleSettings ( std::vector indents; indents.push_back (0); - for (auto& line : lines) + for (const auto& line : lines) { auto indent = getIndentation (line); auto tokens = tokenizeLine (line);