]> git.sesse.net Git - stockfish/commitdiff
Fix a compile error with Intel C++
authorMarco Costalba <mcostalba@gmail.com>
Wed, 30 Apr 2014 06:55:45 +0000 (08:55 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Wed, 30 Apr 2014 06:55:45 +0000 (08:55 +0200)
Intel compiler is very picky:
"error: this operation on an enumerated type requires an
applicable user-defined operator function"

Reported by Tony Gaor.

No functional change.

src/evaluate.cpp

index be53a73ee886633bc7775c3453856a50531e78e6..c2b94b75365885d53d083ce2badfb6eacb6ebdd6 100644 (file)
@@ -791,7 +791,7 @@ namespace {
     Value v =  mg_value(score) * int(ei.mi->game_phase())
              + eg_value(score) * int(PHASE_MIDGAME - ei.mi->game_phase()) * sf / SCALE_FACTOR_NORMAL;
 
-    v /= PHASE_MIDGAME;
+    v /= int(PHASE_MIDGAME);
 
     // In case of tracing add all single evaluation contributions for both white and black
     if (Trace)