]> git.sesse.net Git - stockfish/blobdiff - src/types.h
Merge branch 'eval_cache'
[stockfish] / src / types.h
index 2219b40becd8d929e8e73186374e2895b2411e40..785d98986ea39e1cbcab7bbb8e65562ace65efe7 100644 (file)
@@ -35,6 +35,7 @@
 ///               | only in 64-bit mode. For compiling requires hardware with
 ///               | popcnt support.
 
 ///               | only in 64-bit mode. For compiling requires hardware with
 ///               | popcnt support.
 
+#include <cassert>
 #include <cctype>
 #include <climits>
 #include <cstdlib>
 #include <cctype>
 #include <climits>
 #include <cstdlib>
@@ -391,7 +392,8 @@ inline PieceType type_of(Piece p)  {
 }
 
 inline Color color_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) {
 }
 
 inline bool is_ok(Square s) {