mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 16:46:30 +08:00
Remove xxx_of_color() helpers
They hide the underlying uniform function call with no benefit. A little bit more verbose but now is clear what happens. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -1074,7 +1074,7 @@ namespace {
|
||||
Square b6 = relative_square(us, (square_file(s) == FILE_A) ? SQ_B6 : SQ_G6);
|
||||
Square b8 = relative_square(us, (square_file(s) == FILE_A) ? SQ_B8 : SQ_G8);
|
||||
|
||||
if ( pos.piece_on(b6) == pawn_of_color(opposite_color(us))
|
||||
if ( pos.piece_on(b6) == piece_of_color_and_type(opposite_color(us), PAWN)
|
||||
&& pos.see(s, b6) < 0
|
||||
&& pos.see(s, b8) < 0)
|
||||
{
|
||||
@@ -1091,7 +1091,7 @@ namespace {
|
||||
|
||||
void evaluate_trapped_bishop_a1h1(const Position &pos, Square s, Color us,
|
||||
EvalInfo &ei) {
|
||||
Piece pawn = pawn_of_color(us);
|
||||
Piece pawn = piece_of_color_and_type(us, PAWN);
|
||||
Square b2, b3, c3;
|
||||
|
||||
assert(Chess960);
|
||||
|
||||
Reference in New Issue
Block a user