X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftypes.h;h=5fee1786f77564b060afbc3719a3f21f134fa8fb;hp=8cdb5227c0055efa4df754be4b30d0d0e0d2fa86;hb=6f48367094082ad03526f6ffe24d7c3873ff7386;hpb=8f6a494ad70eccf744c1b03d23313fe06d131ded diff --git a/src/types.h b/src/types.h index 8cdb5227..5fee1786 100644 --- a/src/types.h +++ b/src/types.h @@ -136,7 +136,7 @@ enum CastlingSide { KING_SIDE, QUEEN_SIDE, CASTLING_SIDE_NB = 2 }; -enum CastlingRight { // Defined as in PolyGlot book hash key +enum CastlingRight { NO_CASTLING, WHITE_OO, WHITE_OOO = WHITE_OO << 1, @@ -274,7 +274,7 @@ typedef union { inline Score make_score(int mg, int eg) { ScoreView v; - v.half.mg = (int16_t)mg - (uint16_t(eg) >> 15); + v.half.mg = (int16_t)(mg - (uint16_t(eg) >> 15)); v.half.eg = (int16_t)eg; return Score(v.full); }