X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbitbase.cpp;fp=src%2Fbitbase.cpp;h=60048289218b907f07005ee38446d4e4dc4e7556;hp=3c9bf6e89e03c9aab7cd83a8948c0c914c4e2e49;hb=759b3c79cf94d101163f646b1eb2a9f9c64293ab;hpb=350dff446481b9e274e54dc727141f0dbfec0b23 diff --git a/src/bitbase.cpp b/src/bitbase.cpp index 3c9bf6e8..60048289 100644 --- a/src/bitbase.cpp +++ b/src/bitbase.cpp @@ -29,7 +29,7 @@ namespace { // There are 24 possible pawn squares: the first 4 files and ranks from 2 to 7 - const unsigned MAX_INDEX = 2*24*64*64; // stm * psq * wksq * bksq = 196608 + constexpr unsigned MAX_INDEX = 2*24*64*64; // stm * psq * wksq * bksq = 196608 // Each uint32_t stores results of 32 positions, one per bit uint32_t KPKBitbase[MAX_INDEX / 32]; @@ -152,9 +152,9 @@ namespace { // as WIN, the position is classified as WIN, otherwise the current position is // classified as UNKNOWN. - const Color Them = (Us == WHITE ? BLACK : WHITE); - const Result Good = (Us == WHITE ? WIN : DRAW); - const Result Bad = (Us == WHITE ? DRAW : WIN); + constexpr Color Them = (Us == WHITE ? BLACK : WHITE); + constexpr Result Good = (Us == WHITE ? WIN : DRAW); + constexpr Result Bad = (Us == WHITE ? DRAW : WIN); Result r = INVALID; Bitboard b = PseudoAttacks[KING][ksq[Us]];