]> git.sesse.net Git - stockfish/blobdiff - src/evaluate.cpp
Fixed some warnings when using -Weffc++ gcc option
[stockfish] / src / evaluate.cpp
index 132b8c1b4b7a5e6c3f081c94acef00b814f3a82a..e167bb6994f788ec4a81ae12b236d34b78d371c8 100644 (file)
@@ -241,7 +241,7 @@ namespace {
   template<Color Us>
   Score evaluate_passed_pawns(const Position& pos, EvalInfo& ei);
 
-  Score apply_weight(Score v, Score weight);
+  inline Score apply_weight(Score v, Score weight);
   Value scale_by_game_phase(const Score& v, Phase ph, ScaleFactor sf);
   Score weight_option(const std::string& mgOpt, const std::string& egOpt, Score internalWeight);
   void init_safety();
@@ -334,7 +334,7 @@ Value do_evaluate(const Position& pos, Value& margin) {
   }
 
   // Scale winning side if position is more drawish that what it appears
-  ScaleFactor sf = eg_value(bonus) > VALUE_ZERO ? mi->scale_factor(pos, WHITE)
+  ScaleFactor sf = eg_value(bonus) > VALUE_DRAW ? mi->scale_factor(pos, WHITE)
                                                 : mi->scale_factor(pos, BLACK);
   Phase phase = mi->game_phase();