Skip to content

Commit 613e1d3

Browse files
committed
Fix release build
1 parent 341cea9 commit 613e1d3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Badeend.ValueCollections/Internals/RawBitArray.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ public readonly bool this[int index]
3232
{
3333
get
3434
{
35+
#if DEBUG
3536
Polyfills.DebugAssert((uint)index < (uint)this.length);
37+
#endif
3638

3739
var indexIntoArray = (int)((uint)index / IntSize);
3840
var indexIntoInt = (int)((uint)index % IntSize);
@@ -42,8 +44,10 @@ public readonly bool this[int index]
4244

4345
set
4446
{
47+
#if DEBUG
4548
Polyfills.DebugAssert(value == true, "At the time of writing we only ever set an index to true");
4649
Polyfills.DebugAssert((uint)index < (uint)this.length);
50+
#endif
4751

4852
var indexIntoArray = (int)((uint)index / IntSize);
4953
var indexIntoInt = (int)((uint)index % IntSize);

0 commit comments

Comments
 (0)