mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 17:46:26 +08:00
Simplify code, delete else after return
This commit is contained in:
committed by
Marco Costalba
parent
f3cd7002aa
commit
445aade39c
@@ -652,8 +652,7 @@ ScaleFactor Endgame<KBPKB>::operator()(const Position& pos) const {
|
|||||||
|
|
||||||
if (relative_rank(strongSide, pawnSq) <= RANK_5)
|
if (relative_rank(strongSide, pawnSq) <= RANK_5)
|
||||||
return SCALE_FACTOR_DRAW;
|
return SCALE_FACTOR_DRAW;
|
||||||
else
|
|
||||||
{
|
|
||||||
Bitboard path = forward_bb(strongSide, pawnSq);
|
Bitboard path = forward_bb(strongSide, pawnSq);
|
||||||
|
|
||||||
if (path & pos.pieces(weakSide, KING))
|
if (path & pos.pieces(weakSide, KING))
|
||||||
@@ -663,7 +662,6 @@ ScaleFactor Endgame<KBPKB>::operator()(const Position& pos) const {
|
|||||||
&& distance(weakBishopSq, pawnSq) >= 3)
|
&& distance(weakBishopSq, pawnSq) >= 3)
|
||||||
return SCALE_FACTOR_DRAW;
|
return SCALE_FACTOR_DRAW;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return SCALE_FACTOR_NONE;
|
return SCALE_FACTOR_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user