mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 09:06:45 +08:00
Simplify Weak Lever
This is a simplification that integrated WeakLever into doubled pawns. Since we already check for !support for Doubled pawns, it is trivial to check for weak lever by just checking more_than_one(lever). We also introduce the Score * bool operation overload to remove some casts in the code. STC LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 26757 W: 5842 L: 5731 D: 15184 http://tests.stockfishchess.org/tests/view/5d77ee220ebc5902d384e5a4 Closes https://github.com/official-stockfish/Stockfish/pull/2295 No functional change
This commit is contained in:
committed by
Stéphane Nicolet
parent
61f44ce578
commit
270b241ec1
@@ -345,6 +345,11 @@ inline Score operator*(Score s, int i) {
|
||||
return result;
|
||||
}
|
||||
|
||||
/// Multiplication of a Score by an boolean
|
||||
inline Score operator*(Score s, bool b) {
|
||||
return Score(int(s) * int(b));
|
||||
}
|
||||
|
||||
constexpr Color operator~(Color c) {
|
||||
return Color(c ^ BLACK); // Toggle color
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user