made some optimizations in PopBit and other parts
This commit is contained in:
1 parent
119a87f227
commit
986b49b503
8 files changed
+32
-37
No files matched your search
@@ -36,9 +36,7 @@ void Bitboard::SetBit(int square) {
|
||||
}
|
||||
|
||||
void Bitboard::PopBit(int square) {
|
||||
if (Bitboard(m_board).IsSet(square)) {
|
||||
m_board &= (~Bitboard::GetSquare(square)).GetBoard();
|
||||
}
|
||||
m_board &= ~(1ULL << square);
|
||||
}
|
||||
|
||||
int Bitboard::PopCount() const {
|
||||
@@ -115,4 +113,4 @@ Bitboard Bitboard::operator>>(int other) {
|
||||
|
||||
Bitboard Bitboard::operator~() {
|
||||
return ~(m_board);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user