]> git.sesse.net Git - stockfish/blobdiff - src/movepick.h
Small cleanups
[stockfish] / src / movepick.h
index f210f5387fcb222bb8a0728e4a9e413a2a7b583b..dc171c9ff5ba45143e66d5207f4fd9286e3b0a8b 100644 (file)
 
 namespace Stockfish {
 
-constexpr int PAWN_HISTORY_SIZE = 512;
+constexpr int PAWN_HISTORY_SIZE = 512;  // has to be a power of 2
+
+static_assert((PAWN_HISTORY_SIZE & (PAWN_HISTORY_SIZE - 1)) == 0,
+              "PAWN_HISTORY_SIZE has to be a power of 2");
 
 inline int pawn_structure(const Position& pos) { return pos.pawn_key() & (PAWN_HISTORY_SIZE - 1); }