From cfb52fcd5d307fc0daf6045fc7e299b61fed1017 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Wed, 18 Aug 2010 13:39:14 +0100 Subject: [PATCH] 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 --- src/depth.h | 13 +++---------- src/search.cpp | 2 +- 2 files changed, 4 insertions(+), 11 deletions(-) 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; } -- 2.39.2