X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=e470e61350ca268fdced0c37e8b186448aed535b;hp=e10618494cc1c87a1af02a64909be59af6c78b16;hb=2acda1fde3e1542a0b1bfc5a0885559e6daf142a;hpb=28b6a457c24d9202ba43a6d6703221250f0f8749 diff --git a/src/evaluate.cpp b/src/evaluate.cpp index e1061849..e470e613 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -342,12 +342,12 @@ namespace { // Bonus for outpost squares bb = OutpostRanks & ~pe->pawn_attacks_span(Them); if (bb & s) - score += Outpost[Pt == BISHOP][!!(attackedBy[Us][PAWN] & s)] * 2; + score += Outpost[Pt == BISHOP][bool(attackedBy[Us][PAWN] & s)] * 2; else { bb &= b & ~pos.pieces(Us); if (bb) - score += Outpost[Pt == BISHOP][!!(attackedBy[Us][PAWN] & bb)]; + score += Outpost[Pt == BISHOP][bool(attackedBy[Us][PAWN] & bb)]; } // Bonus when behind a pawn @@ -388,7 +388,7 @@ namespace { // Bonus when on an open or semi-open file if (pe->semiopen_file(Us, file_of(s))) - score += RookOnFile[!!pe->semiopen_file(Them, file_of(s))]; + score += RookOnFile[bool(pe->semiopen_file(Them, file_of(s)))]; // Penalty when trapped by the king, even more if the king cannot castle else if (mob <= 3) @@ -450,7 +450,7 @@ namespace { kingDanger = kingAttackersCount[Them] * kingAttackersWeight[Them] + 102 * kingAdjacentZoneAttacksCount[Them] + 191 * popcount(kingRing[Us] & weak) - + 143 * !!pos.pinned_pieces(Us) + + 143 * bool(pos.pinned_pieces(Us)) - 848 * !pos.count(Them) - 9 * mg_value(score) / 8 + 40;