From de0edd3f47e797315f86ac8cf6402ece8d7b7bd4 Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Wed, 19 Apr 2017 22:32:09 +0430 Subject: the end condition doesnt need to be calculated each time, we are not modifying them in the body --- mutator-lvl0.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mutator-lvl0.cpp') diff --git a/mutator-lvl0.cpp b/mutator-lvl0.cpp index f1ff5a9..2f16974 100644 --- a/mutator-lvl0.cpp +++ b/mutator-lvl0.cpp @@ -278,7 +278,7 @@ private: umRuleList.insert({"0", PopValue}); typedef std::multimap::const_iterator Iter; - for (Iter iter = MC1EquivalencyMap.begin(); iter != MC1EquivalencyMap.end(); ++iter) + for (Iter iter = MC1EquivalencyMap.begin(), iterE = MC1EquivalencyMap.end(); iter != iterE; ++iter) { if (iter->first != std::prev(iter)->first) { @@ -291,7 +291,7 @@ private: { // C2 typedef std::map::const_iterator Iter; - for (Iter iter = MC2OptsMap.begin(); iter != MC2OptsMap.end(); ++iter) + for (Iter iter = MC2OptsMap.begin(), iterE = MC2OptsMap.end(); iter != iterE; ++iter) { umRuleList.insert({iter->first, PopValue}); } @@ -6880,7 +6880,7 @@ public: { unsigned marker = 0U; - for (ArrayRef::iterator iter = TokenArrayRef.begin(); iter != TokenArrayRef.end(); ++iter) + for (ArrayRef::iterator iter = TokenArrayRef.begin(), iterE = TokenArrayRef.end(); iter != iterE; ++iter) { if (iter->getKind() == tok::kw_while) { @@ -8419,7 +8419,7 @@ int main(int argc, const char **argv) if (SOPProto.MC2Parser()) { typedef std::multimap::iterator Iter; - for (Iter iter = MC1EquivalencyMap.begin(); iter != MC1EquivalencyMap.end(); ++iter) + for (Iter iter = MC1EquivalencyMap.begin(), iterE = MC1EquivalencyMap.end(); iter != iterE; ++iter) { std::cout << "Key: " << iter->first << " " << "Value: " << iter->second << "\n"; } -- cgit v1.2.3