X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftypes.h;h=f018311dc70f629b4d324a9ed96b379cf0e7f587;hp=4931531b54a87f37e70628c035158c91b9642c8e;hb=4ce08482c3b0685691162bfc9115ccc7656674b4;hpb=80bee85d5f48cc1e06f16236a73c86a14c1d0756 diff --git a/src/types.h b/src/types.h index 4931531b..f018311d 100644 --- a/src/types.h +++ b/src/types.h @@ -125,6 +125,12 @@ inline T operator* (int i, const T d) { return T(int(d) * i); } template inline T operator/ (const T d, int i) { return T(int(d) / i); } +template +inline void operator++ (T& d, int) { d = T(int(d) + 1); } + +template +inline void operator-- (T& d, int) { d = T(int(d) - 1); } + template inline void operator+= (T& d1, const T d2) { d1 = d1 + d2; }