From 942fd2bcfd384a12c900999fe663202c87319a68 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 6 Apr 2021 20:06:18 +0100 Subject: Switch simple iterator loops to use range-based for loops. --- src/inspstring.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/inspstring.cpp') diff --git a/src/inspstring.cpp b/src/inspstring.cpp index a94b46fac..e231ec398 100644 --- a/src/inspstring.cpp +++ b/src/inspstring.cpp @@ -225,10 +225,10 @@ bool TokenList::operator==(const TokenList& other) const if (tokens.size() != other.tokens.size()) return false; - for (insp::flat_set::const_iterator iter = tokens.begin(); iter != tokens.end(); ++iter) + for (const auto& token : tokens) { // Both sets must contain the same tokens to be equal. - if (other.tokens.find(*iter) == other.tokens.end()) + if (other.tokens.find(token) == other.tokens.end()) return false; } -- cgit v1.3.1-10-gc9f91