]> git.sesse.net Git - stockfish/blobdiff - src/types.h
Rename MoveStack to ExtMove
[stockfish] / src / types.h
index c5b901a98d4e64603b60446c522ec4884fa04627..51c05b2ffc12139ac8b6eca184b5b6707791d24a 100644 (file)
@@ -42,6 +42,8 @@
 
 #include "platform.h"
 
+#define unlikely(x) (x) // For code annotation purposes
+
 #if defined(_WIN64) && !defined(IS_64BIT)
 #  include <intrin.h> // MSVC popcnt and bsfq instrinsics
 #  define IS_64BIT
@@ -310,14 +312,13 @@ inline Score operator/(Score s, int i) {
 #undef ENABLE_SAFE_OPERATORS_ON
 
 extern Value PieceValue[PHASE_NB][PIECE_NB];
-extern int SquareDistance[SQUARE_NB][SQUARE_NB];
 
-struct MoveStack {
+struct ExtMove {
   Move move;
   int score;
 };
 
-inline bool operator<(const MoveStack& f, const MoveStack& s) {
+inline bool operator<(const ExtMove& f, const ExtMove& s) {
   return f.score < s.score;
 }
 
@@ -391,18 +392,6 @@ inline bool opposite_colors(Square s1, Square s2) {
   return ((s >> 3) ^ s) & 1;
 }
 
-inline int file_distance(Square s1, Square s2) {
-  return abs(file_of(s1) - file_of(s2));
-}
-
-inline int rank_distance(Square s1, Square s2) {
-  return abs(rank_of(s1) - rank_of(s2));
-}
-
-inline int square_distance(Square s1, Square s2) {
-  return SquareDistance[s1][s2];
-}
-
 inline char file_to_char(File f, bool tolower = true) {
   return char(f - FILE_A + (tolower ? 'a' : 'A'));
 }