]> git.sesse.net Git - stockfish/blobdiff - src/types.h
Revert store of distinct upper and lower bounds
[stockfish] / src / types.h
index 9b36fd89fde9f9505dc54a2093bab49711cbf651..99567bd7e22a608de7ca91a16d81058112661624 100644 (file)
@@ -35,6 +35,7 @@
 ///               | only in 64-bit mode. For compiling requires hardware with
 ///               | popcnt support.
 
+#include <cassert>
 #include <cctype>
 #include <climits>
 #include <cstdlib>
@@ -391,7 +392,8 @@ inline PieceType type_of(Piece p)  {
 }
 
 inline Color color_of(Piece p) {
-  return p == NO_PIECE ? NO_COLOR : Color(p >> 3);
+  assert(p != NO_PIECE);
+  return Color(p >> 3);
 }
 
 inline bool is_ok(Square s) {