]> git.sesse.net Git - stockfish/blobdiff - src/types.h
Fix a couple of extra spaces
[stockfish] / src / types.h
index eea31e3b6f229cf8cc72b1abcdb8c363fce88216..506e1b0f9b5f1adeb6c82db127d89b5165432ec4 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>
@@ -130,12 +131,6 @@ enum MoveType {
   CASTLE    = 3 << 14
 };
 
-enum CheckType {
-  NO_CHECK,
-  DIRECT_CHECK,
-  DISCO_CHECK
-};
-
 enum CastleRight {  // Defined as in PolyGlot book hash key
   CASTLES_NONE = 0,
   WHITE_OO     = 1,
@@ -397,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) {
@@ -479,7 +475,7 @@ inline Move make_move(Square from, Square to) {
 
 template<MoveType T>
 inline Move make(Square from, Square to, PieceType pt = KNIGHT) {
-  return Move(to | (from << 6) | T | ((pt - KNIGHT) << 12)) ;
+  return Move(to | (from << 6) | T | ((pt - KNIGHT) << 12));
 }
 
 inline bool is_ok(Move m) {