made some optimizations in PopBit and other parts

This commit is contained in:
rektdie committed 2024-05-14 23:14:27 +02:00
1 parent 119a87f227
commit 986b49b503
8 files changed
+32 -37

No files matched your search

+2 -4
View File
@@ -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);
}
}