From cb9f3c1a5b2f1eaa7463d653e408902520e9af01 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 11 Jul 2024 14:27:06 +0200 Subject: [PATCH] util/DereferenceIterator: optimize and simplify increment/decrement operators --- src/util/DereferenceIterator.hxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/DereferenceIterator.hxx b/src/util/DereferenceIterator.hxx index 3cc44480c..6d62ff674 100644 --- a/src/util/DereferenceIterator.hxx +++ b/src/util/DereferenceIterator.hxx @@ -44,7 +44,7 @@ public: constexpr auto operator++(int) noexcept { auto old = *this; - original++; + ++original; return old; } @@ -58,13 +58,13 @@ public: } constexpr auto &operator--() noexcept { - original = --original; + --original; return *this; } constexpr auto operator--(int) noexcept { auto old = *this; - original--; + --original; return old; }