From 6c898a10be75bc2c295a7dca7f72e51e76ec8293 Mon Sep 17 00:00:00 2001 From: Alain SAVARD Date: Wed, 21 Feb 2018 00:52:26 +0100 Subject: [PATCH] Avoid a compilation warning Avoid a warning while compiling with gcc version 4.9.2 No functional change. --- src/evaluate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 2a52ba1c..6042ae33 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -758,7 +758,7 @@ namespace { && (pos.pieces(PAWN) & KingSide); // Compute the initiative bonus for the attacking side - int initiative = 8 * outflanking + int complexity = 8 * outflanking + 8 * pe->pawn_asymmetry() + 12 * pos.count() + 16 * pawnsOnBothFlanks @@ -767,7 +767,7 @@ namespace { // Now apply the bonus: note that we find the attacking side by extracting // the sign of the endgame value, and that we carefully cap the bonus so // that the endgame score will never change sign after the bonus. - int v = ((eg > 0) - (eg < 0)) * std::max(initiative, -abs(eg)); + int v = ((eg > 0) - (eg < 0)) * std::max(complexity, -abs(eg)); if (T) Trace::add(INITIATIVE, make_score(0, v)); -- 2.39.2