mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 09:13:08 +00:00
Initialize futilityMargin in EvalInfo c'tor
This is less prone to bugs because now it's up to the compiler don't forget this important initialization. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
000a975eaf
commit
b5d38ad1e5
2 changed files with 2 additions and 2 deletions
|
@ -47,6 +47,8 @@ class Position;
|
||||||
|
|
||||||
struct EvalInfo {
|
struct EvalInfo {
|
||||||
|
|
||||||
|
EvalInfo() : futilityMargin(Value(0)) {}
|
||||||
|
|
||||||
// Middle game and endgame evaluations
|
// Middle game and endgame evaluations
|
||||||
Score value;
|
Score value;
|
||||||
|
|
||||||
|
|
|
@ -1370,7 +1370,6 @@ namespace {
|
||||||
}
|
}
|
||||||
|
|
||||||
isCheck = pos.is_check();
|
isCheck = pos.is_check();
|
||||||
ei.futilityMargin = Value(0); // Manually initialize futilityMargin
|
|
||||||
|
|
||||||
// Calculate depth dependant futility pruning parameters
|
// Calculate depth dependant futility pruning parameters
|
||||||
const int FutilityMoveCountMargin = 3 + (1 << (3 * int(depth) / 8));
|
const int FutilityMoveCountMargin = 3 + (1 << (3 * int(depth) / 8));
|
||||||
|
@ -1672,7 +1671,6 @@ namespace {
|
||||||
}
|
}
|
||||||
|
|
||||||
isCheck = pos.is_check();
|
isCheck = pos.is_check();
|
||||||
ei.futilityMargin = Value(0); // Manually initialize futilityMargin
|
|
||||||
|
|
||||||
// Evaluate the position statically
|
// Evaluate the position statically
|
||||||
if (isCheck)
|
if (isCheck)
|
||||||
|
|
Loading…
Add table
Reference in a new issue