This commit is contained in:
2025-02-20 19:33:15 -05:00
parent d29095bc9d
commit 2011ae001b
4 changed files with 11 additions and 51 deletions

View File

@@ -26,19 +26,15 @@ pub struct BitBoard(BitBoardInner);
// BitBoard should be big enough to fit all points on the board
const_assert!(std::mem::size_of::<BitBoard>() * 8 >= Board::BOARD_AREA);
impl Default for BitBoard {
fn default() -> Self {
Self::new()
}
}
impl BitBoard {
#[cfg(feature = "bitvec")]
#[allow(clippy::new_without_default)]
pub const fn new() -> Self {
Self(bitarr!(BBBaseType, Lsb0; 0; Board::BOARD_AREA))
}
#[cfg(not(feature = "bitvec"))]
#[allow(clippy::new_without_default)]
pub const fn new() -> Self {
Self(0)
}