]> git.sesse.net Git - stockfish/blobdiff - src/position.cpp
Introduce enum VALUE_ZERO instead of Value(0)
[stockfish] / src / position.cpp
index c8132d5e513d2a1b2d4aa6a711f96e1440b0b5f7..058fab66b13940b2db943aef8548c46b63d1e936 100644 (file)
@@ -182,7 +182,7 @@ void Position::from_fen(const string& fen) {
   {
       if (isdigit(token))
       {
-          file += token - '0'; // Skip the given number of files
+          file += File(token - '0'); // Skip the given number of files
           continue;
       }
       else if (token == '/')
@@ -1686,7 +1686,7 @@ Score Position::compute_value() const {
 
 Value Position::compute_non_pawn_material(Color c) const {
 
-  Value result = Value(0);
+  Value result = VALUE_ZERO;
 
   for (PieceType pt = KNIGHT; pt <= QUEEN; pt++)
   {