Small trivial clean-ups, February 2021

Closes https://github.com/official-stockfish/Stockfish/pull/3329

No functional change
This commit is contained in:
Lolligerhans
2021-01-31 13:46:05 +01:00
committed by Stéphane Nicolet
parent b46813f9b7
commit 40cb0f076a
5 changed files with 19 additions and 21 deletions

View File

@@ -99,11 +99,11 @@ void MovePicker::score() {
static_assert(Type == CAPTURES || Type == QUIETS || Type == EVASIONS, "Wrong type");
for (auto& m : *this)
if (Type == CAPTURES)
if constexpr (Type == CAPTURES)
m.value = int(PieceValue[MG][pos.piece_on(to_sq(m))]) * 6
+ (*captureHistory)[pos.moved_piece(m)][to_sq(m)][type_of(pos.piece_on(to_sq(m)))];
else if (Type == QUIETS)
else if constexpr (Type == QUIETS)
m.value = (*mainHistory)[pos.side_to_move()][from_to(m)]
+ 2 * (*continuationHistory[0])[pos.moved_piece(m)][to_sq(m)]
+ (*continuationHistory[1])[pos.moved_piece(m)][to_sq(m)]