| 167 | } |
| 168 | |
| 169 | void TSIntegerSet::next(S32 & i) const |
| 170 | { |
| 171 | i++; |
| 172 | U32 idx = i>>5; |
| 173 | U32 bit = 1 << (i&31); |
| 174 | U32 dword = bits[idx] & ~(bit-1); |
| 175 | while (dword==0) |
| 176 | { |
| 177 | i = (i+32) & ~31; |
| 178 | if (i>=MAX_TS_SET_SIZE) |
| 179 | return; |
| 180 | dword=bits[++idx]; |
| 181 | bit = 1; |
| 182 | } |
| 183 | dword = bits[idx]; |
| 184 | while ( (bit & dword) == 0) |
| 185 | { |
| 186 | bit <<= 1; |
| 187 | i++; |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | /* Or would one byte at a time be better... |
| 192 | void TSIntegerSet::next(S32 & i) |
no outgoing calls
no test coverage detected