From ad82cd1027112454757e984a8f9230e05349ac46 Mon Sep 17 00:00:00 2001 From: JonathanSteininger Date: Fri, 16 May 2025 14:09:18 +1200 Subject: [PATCH] Use foreach loop. --- src/config.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.cpp b/src/config.cpp index a64bfb8..4569723 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -710,8 +710,8 @@ CParseResult CConfig::parseLine(std::string line, bool dynamic) { continue; } //checks if any of the chars were escapable. - for (size_t j = 0; j < ESCAPE_SET.size(); j++) { - if (RHS.at(i + 1) != ESCAPE_SET[j]) + for (const auto& ESCAPABLE_CHAR : ESCAPE_SET) { + if (RHS.at(i + 1) != ESCAPABLE_CHAR) continue; RHS.erase(i--, 1); break;