Small cleanups

closes https://github.com/official-stockfish/Stockfish/pull/2606

No functional change
This commit is contained in:
Joost VandeVondele
2020-04-12 20:30:08 +02:00
parent 195a4fec6d
commit f83cb95740
11 changed files with 48 additions and 54 deletions

View File

@@ -177,9 +177,9 @@ enum Value : int {
VALUE_NONE = 32002,
VALUE_TB_WIN_IN_MAX_PLY = VALUE_MATE - 2 * MAX_PLY,
VALUE_TB_LOSS_IN_MAX_PLY = -VALUE_MATE + 2 * MAX_PLY,
VALUE_TB_LOSS_IN_MAX_PLY = -VALUE_TB_WIN_IN_MAX_PLY,
VALUE_MATE_IN_MAX_PLY = VALUE_MATE - MAX_PLY,
VALUE_MATED_IN_MAX_PLY = -VALUE_MATE + MAX_PLY,
VALUE_MATED_IN_MAX_PLY = -VALUE_MATE_IN_MAX_PLY,
PawnValueMg = 128, PawnValueEg = 213,
KnightValueMg = 781, KnightValueEg = 854,
@@ -351,7 +351,7 @@ inline Score operator*(Score s, int i) {
/// Multiplication of a Score by a boolean
inline Score operator*(Score s, bool b) {
return Score(int(s) * int(b));
return b ? s : SCORE_ZERO;
}
constexpr Color operator~(Color c) {