]> git.sesse.net Git - stockfish/commitdiff
Avoid a compilation warning
authorAlain SAVARD <support@multicim.com>
Tue, 20 Feb 2018 23:52:26 +0000 (00:52 +0100)
committerStéphane Nicolet <cassio@free.fr>
Tue, 20 Feb 2018 23:52:59 +0000 (00:52 +0100)
Avoid a warning while compiling with gcc version 4.9.2

No functional change.

src/evaluate.cpp

index 2a52ba1c5bb0b3ac686f1e880635937edb5543af..6042ae3312e1690f3a2b26a72895532ef1ddb455 100644 (file)
@@ -758,7 +758,7 @@ namespace {
                             && (pos.pieces(PAWN) & KingSide);
 
     // Compute the initiative bonus for the attacking side
                             && (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<PAWN>()
                     + 16 * pawnsOnBothFlanks
                     +  8 * pe->pawn_asymmetry()
                     + 12 * pos.count<PAWN>()
                     + 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.
     // 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));
 
     if (T)
         Trace::add(INITIATIVE, make_score(0, v));