From a9e9746495821fe7251d5f86ea3a97cb91eac729 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Fri, 9 Apr 2010 07:05:32 +0100 Subject: [PATCH 1/1] Fix a warning under HP-UX ANSI C++ Reported warning is: warning #2514-D: pointless comparison of unsigned integer with a negative constant Spotted by Richard Lloyd. No functional change. Signed-off-by: Marco Costalba --- src/depth.h | 3 ++- src/search.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/depth.h b/src/depth.h index 92ce6e22..05008e05 100644 --- a/src/depth.h +++ b/src/depth.h @@ -27,7 +27,8 @@ enum Depth { DEPTH_ZERO = 0, - DEPTH_MAX = 200 // 100 * OnePly; + DEPTH_MAX = 200, // 100 * OnePly; + DEPTH_ENSURE_SIGNED = -1 }; diff --git a/src/search.cpp b/src/search.cpp index 5ea75fec..fd5687ea 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1666,7 +1666,7 @@ namespace { alpha = bestValue; // If we are near beta then try to get a cutoff pushing checks a bit further - bool deepChecks = depth == -OnePly && staticValue >= beta - PawnValueMidgame / 8; + bool deepChecks = (depth == -OnePly && staticValue >= beta - PawnValueMidgame / 8); // Initialize a MovePicker object for the current position, and prepare // to search the moves. Because the depth is <= 0 here, only captures, -- 2.39.2