mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 16:46:30 +08:00
Small trivial clean-ups, February 2021
Closes https://github.com/official-stockfish/Stockfish/pull/3329 No functional change
This commit is contained in:
committed by
Stéphane Nicolet
parent
b46813f9b7
commit
40cb0f076a
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user