Skip a couple of popcount in previous patch

And some little tidy up

No functional change.
This commit is contained in:
Marco Costalba
2013-04-19 09:41:28 +02:00
parent cc40d1c46a
commit f84f04742a
4 changed files with 11 additions and 11 deletions

View File

@@ -63,7 +63,6 @@ extern Bitboard PassedPawnMask[COLOR_NB][SQUARE_NB];
extern Bitboard AttackSpanMask[COLOR_NB][SQUARE_NB];
extern Bitboard PseudoAttacks[PIECE_TYPE_NB][SQUARE_NB];
const Bitboard WhiteSquares = 0x55AA55AA55AA55AAULL;
const Bitboard BlackSquares = 0xAA55AA55AA55AA55ULL;
/// Overloads of bitwise operators between a Bitboard and a Square for testing
@@ -201,8 +200,7 @@ inline bool squares_aligned(Square s1, Square s2, Square s3) {
/// the same color of the given square.
inline Bitboard same_color_squares(Square s) {
return Bitboard(0xAA55AA55AA55AA55ULL) & s ? 0xAA55AA55AA55AA55ULL
: ~0xAA55AA55AA55AA55ULL;
return BlackSquares & s ? BlackSquares : ~BlackSquares;
}