From 7134c82848a3103187b0de75ca17b4a0402c6747 Mon Sep 17 00:00:00 2001 From: John Date: Sat, 3 Jun 2023 19:52:19 +0200 Subject: [PATCH] prefer const iterator --- src/lib/ebus/datatype.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/ebus/datatype.h b/src/lib/ebus/datatype.h index 34ac913e..1b9a2d6e 100755 --- a/src/lib/ebus/datatype.h +++ b/src/lib/ebus/datatype.h @@ -676,13 +676,13 @@ class DataTypeList { * Returns an iterator pointing to the first ID/@a DataType pair. * @return an iterator pointing to the first ID/@a DataType pair. */ - map::const_iterator begin() const { return m_typesById.begin(); } + map::const_iterator begin() const { return m_typesById.cbegin(); } /** * Returns an iterator pointing one past the last ID/@a DataType pair. * @return an iterator pointing one past the last ID/@a DataType pair. */ - map::const_iterator end() const { return m_typesById.end(); } + map::const_iterator end() const { return m_typesById.cend(); } private: /** the known @a DataType instances by ID (e.g. "ID:BITS" or just "ID").