| 940 | } |
| 941 | |
| 942 | size_t FirstNonZeroBit() const { |
| 943 | for (size_t i = 0; i < Mask.GetChunkCapacity(); ++i) { |
| 944 | if (Mask.Data[i]) { |
| 945 | // CountTrailingZeroBits() expects unsigned types not smaller than unsigned int. So, convert before calling |
| 946 | return BitsPerChunk * i + CountTrailingZeroBits(TIntType(Mask.Data[i])); |
| 947 | } |
| 948 | } |
| 949 | return Size(); |
| 950 | } |
| 951 | |
| 952 | // Returns position of the next non-zero bit, which offset is greater than specified pos |
| 953 | // Typical loop for iterating bits: |
no test coverage detected