]> git.sesse.net Git - stockfish/commitdiff
Fix build on Intel compiler
authorMarco Costalba <mcostalba@gmail.com>
Sat, 13 Jul 2013 21:07:24 +0000 (23:07 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 20 Oct 2013 21:19:08 +0000 (23:19 +0200)
Due to a strange issue (bug?) the ternary
operator does not return a BitCountType for
icc, so revert to the expression.

The same patch was already applied in
9749f1f14c956133c2f42f96592b

Thanks to NssY Wanyonyi for pointing out
this.

No functional change.

src/evaluate.cpp

index d87c51272862dac0cea0f79a7caf8dc2e4062f7b..71120fde8fb20ca99ff4e9d691ad7d31889258b7 100644 (file)
@@ -508,7 +508,9 @@ Value do_evaluate(const Position& pos, Value& margin) {
                 ei.kingAdjacentZoneAttacksCount[Us] += popcount<Max15>(bb);
         }
 
-        int mob = popcount<Piece == QUEEN ? Full : Max15>(b & mobilityArea);
+        int mob = Piece != QUEEN ? popcount<Max15>(b & mobilityArea)
+                                 : popcount<Full >(b & mobilityArea);
+
         mobility[Us] += MobilityBonus[Piece][mob];
 
         // Decrease score if we are attacked by an enemy pawn. Remaining part