mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 09:37:16 +08:00
Use templetized operations for File and Rank
Doing the conversion the compiler is now able to spot two possible ambiguity calls that now we can easily fix. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -125,6 +125,12 @@ inline T operator* (int i, const T d) { return T(int(d) * i); }
|
||||
template<typename T>
|
||||
inline T operator/ (const T d, int i) { return T(int(d) / i); }
|
||||
|
||||
template<typename T>
|
||||
inline void operator++ (T& d, int) { d = T(int(d) + 1); }
|
||||
|
||||
template<typename T>
|
||||
inline void operator-- (T& d, int) { d = T(int(d) - 1); }
|
||||
|
||||
template<typename T>
|
||||
inline void operator+= (T& d1, const T d2) { d1 = d1 + d2; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user