From 7c29ebd93fba0456707cf7aa6467c1a5ff0b993f Mon Sep 17 00:00:00 2001 From: Markus Scherer Date: Sat, 8 Mar 2025 16:03:44 -0800 Subject: [PATCH] ICU-23004 unnecessarily const fields make non-movable --- icu4c/source/common/unicode/utfiter.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/icu4c/source/common/unicode/utfiter.h b/icu4c/source/common/unicode/utfiter.h index 5d31e9da965..ba928d96b3c 100644 --- a/icu4c/source/common/unicode/utfiter.h +++ b/icu4c/source/common/unicode/utfiter.h @@ -1038,8 +1038,8 @@ private: mutable UnitIter p_; // In a validating iterator, we need start_ & limit_ so that when we read a code point // (forward or backward) we can test if there are enough code units. - const UnitIter start_; - const UnitIter limit_; + UnitIter start_; + UnitIter limit_; // Keep state so that we call readAndInc() only once for both operator*() and ++ // to make it easy for the compiler to optimize. mutable CodeUnits units_; @@ -1143,7 +1143,7 @@ private: mutable UnitIter p_; // In a validating iterator, we need limit_ so that when we read a code point // we can test if there are enough code units. - const UnitIter limit_; + UnitIter limit_; // Keep state so that we call readAndInc() only once for both operator*() and ++ // so that we can use a single-pass input iterator for UnitIter. mutable CodeUnits units_ = {0, 0, false}; @@ -1277,8 +1277,8 @@ private: mutable UnitIter p_; // In a validating iterator, we need start_ & limit_ so that when we read a code point // (forward or backward) we can test if there are enough code units. - const UnitIter start_; - const UnitIter limit_; + UnitIter start_; + UnitIter limit_; // Keep state so that we call decAndRead() only once for both operator*() and ++ // to make it easy for the compiler to optimize. mutable CodeUnits_ units_;