Issue #1925 - Change Side's operator++ from postfix to prefix.

The postfix operator++ was actually incorrectly implemented (the
implementation is a prefix version). Since it's only used in the adjacent
macro, there's no risk with this change to correct that.
This commit is contained in:
Moonchild 2024-08-01 18:58:14 +02:00 committed by roytam1
commit 3a153f32e3

View file

@ -397,9 +397,9 @@ enum SideBits {
for (mozilla::Side var_; \
MOZ_CONCAT(var_,__LINE__) <= mozilla::eSideLeft && \
((var_ = mozilla::Side(MOZ_CONCAT(var_,__LINE__))), true); \
MOZ_CONCAT(var_,__LINE__)++)
++MOZ_CONCAT(var_,__LINE__))
static inline Side operator++(Side& side, int) {
static inline Side& operator++(Side& side) {
MOZ_ASSERT(side >= eSideTop && side <= eSideLeft,
"Out of range side");
side = Side(side + 1);