1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-05-03 18:19:35 +00:00

Small code style tidy up

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2009-02-06 16:21:00 +01:00
parent fa322b3768
commit 76381cbd69
3 changed files with 20 additions and 21 deletions

View file

@ -775,8 +775,8 @@ namespace {
// Find all friendly pawns not on the enemy king's file
Bitboard b1 = pos.pawns(Us) & ~file_bb(ksq), b2, b3;
// Discovered checks, single pawn pushes
b2 = b3 = (Us == WHITE ? (b1 & dc) << 8 : (b1 & dc) >> 8) & ~TRank8BB & empty;
// Discovered checks, single pawn pushes, no promotions
b2 = b3 = (Us == WHITE ? (b1 & dc) << 8 : (b1 & dc) >> 8) & empty & ~TRank8BB;
while (b3)
{
Square to = pop_1st_bit(&b3);
@ -793,8 +793,7 @@ namespace {
// Direct checks. These are possible only for pawns on neighboring files
// of the enemy king
b1 &= (~dc & neighboring_files_bb(ksq)); // FIXME why ~dc ??
b1 &= (~dc & neighboring_files_bb(ksq));
// Direct checks, single pawn pushes
b2 = (Us == WHITE ? b1 << 8 : b1 >> 8) & empty;

View file

@ -1967,7 +1967,7 @@ Value Position::compute_non_pawn_material(Color c) const {
/// side to move is checkmated. Note that this function is currently very
/// slow, and shouldn't be used frequently inside the search.
bool Position::is_mate() {
bool Position::is_mate() const {
if (is_check())
{

View file

@ -268,7 +268,7 @@ public:
Value mg_pst_delta(Move m) const;
// Game termination checks
bool is_mate();
bool is_mate() const;
bool is_draw() const;
// Check if one side threatens a mate in one