]> git.sesse.net Git - stockfish/blobdiff - src/depth.h
Use templetized operations for Square
[stockfish] / src / depth.h
index 96b9197cfb99d508399a05f459ab20e22519a655..ab88f652a4bda753fdeeaac42478027767920276 100644 (file)
 
 enum Depth {
 
-  OnePly = 2,
-  DEPTH_NONE = -127 * OnePly
-};
-
-
-////
-//// Inline functions
-////
+  ONE_PLY = 2,
 
-inline Depth operator+ (Depth d, int i) { return Depth(int(d) + i); }
-inline Depth operator+ (Depth d1, Depth d2) { return Depth(int(d1) + int(d2)); }
-inline void operator+= (Depth &d, int i) { d = Depth(int(d) + i); }
-inline void operator+= (Depth &d1, Depth d2) { d1 += int(d2); }
-inline Depth operator- (Depth d, int i) { return Depth(int(d) - i); }
-inline Depth operator- (Depth d1, Depth d2) { return Depth(int(d1) - int(d2)); }
-inline void operator-= (Depth &d, int i) { d = Depth(int(d) - i); }
-inline void operator-= (Depth &d1, Depth d2) { d1 -= int(d2); }
-inline Depth operator* (Depth d, int i) { return Depth(int(d) * i); }
-inline Depth operator* (int i, Depth d) { return Depth(int(d) * i); }
-inline void operator*= (Depth &d, int i) { d = Depth(int(d) * i); }
-inline Depth operator/ (Depth d, int i) { return Depth(int(d) / i); }
-inline void operator/= (Depth &d, int i) { d = Depth(int(d) / i); }
+  DEPTH_ZERO = 0,
+  DEPTH_NONE = -127 * ONE_PLY
+};
 
 
 #endif // !defined(DEPTH_H_INCLUDED)