util/DereferenceIterator: optimize and simplify increment/decrement operators

This commit is contained in:
Max Kellermann 2024-07-11 14:27:06 +02:00
parent fe66cde616
commit cb9f3c1a5b
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}