From 9d08eec68e37dc2f5afdaa134e9c97c61a797dc5 Mon Sep 17 00:00:00 2001 From: John Date: Fri, 16 Jun 2023 19:45:29 +0200 Subject: [PATCH] better iterator --- src/lib/ebus/data.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/ebus/data.cpp b/src/lib/ebus/data.cpp index 7b8cf125..4500771c 100644 --- a/src/lib/ebus/data.cpp +++ b/src/lib/ebus/data.cpp @@ -793,9 +793,9 @@ result_t ValueListDataField::writeSymbols(size_t offset, istringstream* input, return numType->writeRawValue(numType->getReplacement(), offset, m_length, output, usedLength); } - for (map::const_iterator it = m_values.begin(); it != m_values.end(); ++it) { - if (it->second == inputStr) { - return numType->writeRawValue(it->first, offset, m_length, output, usedLength); + for (const auto& it : m_values) { + if (it.second == inputStr) { + return numType->writeRawValue(it.first, offset, m_length, output, usedLength); } } const char* str = inputStr.c_str();