From 0befcc026be9e4f6c40f8771c7f26f767ebddbf7 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 30 Sep 2024 11:50:17 -0700 Subject: Erasing streams works, stream map building works. --- src/unstable/bitstring.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/unstable/bitstring.cpp') diff --git a/src/unstable/bitstring.cpp b/src/unstable/bitstring.cpp index 21c1316..b80c073 100644 --- a/src/unstable/bitstring.cpp +++ b/src/unstable/bitstring.cpp @@ -209,7 +209,7 @@ void Bu::BitString::flipBit( long iBit ) caData[iBit/8] ^= (1<<(iBit%8)); } -bool Bu::BitString::getBit( long iBit ) +bool Bu::BitString::getBit( long iBit ) const { if( iBit >= iBits || iBit < 0 ) return false; if( (caData[iBit/8] & (1<<(iBit%8))) == 0 ) @@ -224,7 +224,7 @@ long Bu::BitString::getBitLength() return iBits; } -long Bu::BitString::getSize() +long Bu::BitString::getSize() const { return iBits; } @@ -311,6 +311,14 @@ void Bu::BitString::clear() } } +void Bu::BitString::fill() +{ + if( caData != NULL ) + { + memset( caData, 0xff, iBytes ); + } +} + bool Bu::BitString::setBitLength( long iLength, bool bClear ) { return setSize( iLength, bClear ); -- cgit v1.2.3