Small cleanups

Corrects some incorrect or outdated comments.
Credit is shared with yaneurao (see 38e830a#commitcomment-131131500) and locutus2

closes #4852

No functional change.
This commit is contained in:
cj5716
2023-10-29 09:18:10 +08:00
committed by Joost VandeVondele
parent 347d613b0e
commit 38aa70adcf
2 changed files with 13 additions and 7 deletions

View File

@@ -32,7 +32,10 @@
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); }