@@ -414,7 +414,6 @@ const:
414414
415415 sizediff_t nBitsToCount (size_t count)
416416 {
417- import std.stdio ;
418417 size_t ret;
419418 if (count == 0 )
420419 return count;
@@ -426,14 +425,10 @@ const:
426425 }
427426 v = headBitsWithRemainingZeros;
428427 cnt = v.ctpop;
429- writefln(" v = %s at line %s" , v, __LINE__ );
430- writefln(" cnt = %s at line %s" , cnt, __LINE__ );
431428 if (cnt >= count)
432429 goto R;
433430 ret += headLength;
434431 count -= cast (size_t ) cnt;
435- writefln(" v = %s at line %s" , v, __LINE__ );
436- writefln(" cnt = %s at line %s" , cnt, __LINE__ );
437432 if (bodyChunks.length)
438433 {
439434 auto bc = bodyChunks.lightConst;
@@ -452,8 +447,6 @@ const:
452447 v = tailBitsWithRemainingZeros;
453448 E:
454449 cnt = v.ctpop;
455- writefln(" v = %s at line %s" , v, __LINE__ );
456- writefln(" cnt = %s at line %s" , cnt, __LINE__ );
457450 if (cnt >= count)
458451 goto R;
459452 return - 1 ;
@@ -519,7 +512,7 @@ sizediff_t nBitsToCount(Field, I)(Slice!(RetroIterator!(FieldIterator!(BitField!
519512}
520513
521514// /
522- unittest
515+ pure unittest
523516{
524517 import std.stdio ;
525518 import mir.ndslice.allocation: bitSlice;
@@ -530,6 +523,7 @@ unittest
530523 s[200 ] = true ;
531524 s[300 ] = true ;
532525 s[400 ] = true ;
526+ assert (s.nBitsToCount(4 ) == 301 );
533527 assert (s.retro.nBitsToCount(4 ) == 900 );
534528}
535529
0 commit comments