]> git.sesse.net Git - stockfish/commitdiff
Define OnePly as a Depth enum costant
authorMarco Costalba <mcostalba@gmail.com>
Wed, 18 Aug 2010 12:39:14 +0000 (13:39 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Thu, 19 Aug 2010 12:48:11 +0000 (13:48 +0100)
There is no reason to use a variable for this.

Also remove unused DEPTH_ZERO and DEPTH_MAX.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/depth.h
src/search.cpp

index 86af1dffcfbc213ff63935b27d31628eeec2e152..96b9197cfb99d508399a05f459ab20e22519a655 100644 (file)
 ////
 
 enum Depth {
-  DEPTH_ZERO = 0,
-  DEPTH_MAX = 200,  //  100 * OnePly;
-  DEPTH_NONE = -254 // -127 * OnePly
-};
-
-
-////
-//// Constants
-////
 
-const Depth OnePly = Depth(2);
+  OnePly = 2,
+  DEPTH_NONE = -127 * OnePly
+};
 
 
 ////
index 978f6622d3f142a178cf2c92a59ea07bdb9d76bd..3d26d430387e85faffa25d275d33b485978ee3b0 100644 (file)
@@ -1897,7 +1897,7 @@ namespace {
         && pos.type_of_piece_on(move_to(m)) != PAWN
         && pos.see_sign(m) >= 0)
     {
-        result += OnePly/2;
+        result += OnePly / 2;
         *dangerous = true;
     }