From: Marco Costalba Date: Wed, 18 Aug 2010 12:39:14 +0000 (+0100) Subject: Define OnePly as a Depth enum costant X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=cfb52fcd5d307fc0daf6045fc7e299b61fed1017;hp=cf4c28ff86ac76c1d04701e2aa88493d31643db6;ds=sidebyside Define OnePly as a Depth enum costant 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 --- diff --git a/src/depth.h b/src/depth.h index 86af1dff..96b9197c 100644 --- a/src/depth.h +++ b/src/depth.h @@ -26,17 +26,10 @@ //// 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 +}; //// diff --git a/src/search.cpp b/src/search.cpp index 978f6622..3d26d430 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -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; }