mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-23 10:36:26 +08:00
Simplify redundant condition.
closes https://github.com/official-stockfish/Stockfish/pull/4270 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
9d3fd011f1
commit
44ecadee10
@@ -1091,7 +1091,7 @@ Value Eval::evaluate(const Position& pos, int* complexity) {
|
|||||||
v = std::clamp(v, VALUE_TB_LOSS_IN_MAX_PLY + 1, VALUE_TB_WIN_IN_MAX_PLY - 1);
|
v = std::clamp(v, VALUE_TB_LOSS_IN_MAX_PLY + 1, VALUE_TB_WIN_IN_MAX_PLY - 1);
|
||||||
|
|
||||||
// When not using NNUE, return classical complexity to caller
|
// When not using NNUE, return classical complexity to caller
|
||||||
if (complexity && (!useNNUE || useClassical))
|
if (complexity && useClassical)
|
||||||
*complexity = abs(v - psq);
|
*complexity = abs(v - psq);
|
||||||
|
|
||||||
return v;
|
return v;
|
||||||
|
|||||||
Reference in New Issue
Block a user