X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftypes.h;h=a648e6514ed67dd906d3a71dde7270e3a2a97514;hp=4e5de7f72f71214aa63c6616b960c7cd18464c58;hb=7a1ff6d8ff39bb9e6844d24467899d47e942486f;hpb=82f6779c2e549a264dbfc76d4c668f4c2ea831cd diff --git a/src/types.h b/src/types.h index 4e5de7f7..a648e651 100644 --- a/src/types.h +++ b/src/types.h @@ -279,10 +279,10 @@ inline T& operator-=(T& d1, const T d2) { d1 = d1 - d2; return d1; } \ inline T& operator*=(T& d, int i) { d = T(int(d) * i); return d; } #define ENABLE_OPERATORS_ON(T) ENABLE_SAFE_OPERATORS_ON(T) \ -inline T operator++(T& d, int) { d = T(int(d) + 1); return d; } \ -inline T operator--(T& d, int) { d = T(int(d) - 1); return d; } \ +inline T& operator++(T& d) { return d = T(int(d) + 1); } \ +inline T& operator--(T& d) { return d = T(int(d) - 1); } \ inline T operator/(const T d, int i) { return T(int(d) / i); } \ -inline T& operator/=(T& d, int i) { d = T(int(d) / i); return d; } +inline T& operator/=(T& d, int i) { return d = T(int(d) / i); } ENABLE_OPERATORS_ON(Value) ENABLE_OPERATORS_ON(PieceType)