| 145 | |
| 146 | template<class View, bool pos> |
| 147 | forceinline const BitSetData* |
| 148 | Compact<View,pos>::supports(CTAdvisor& a, int n) { |
| 149 | const Range* fnd; |
| 150 | const Range* fst=a.fst(); |
| 151 | const Range* lst=a.lst(); |
| 152 | if (pos) { |
| 153 | if (n <= fst->max) { |
| 154 | fnd=fst; |
| 155 | } else if (n >= lst->min) { |
| 156 | fnd=lst; |
| 157 | } else { |
| 158 | fnd=range(a,n); |
| 159 | } |
| 160 | } else { |
| 161 | if ((n < fst->min) || (n > lst->max)) |
| 162 | return nullptr; |
| 163 | if (n <= fst->max) { |
| 164 | fnd=fst; |
| 165 | } else if (n >= lst->min) { |
| 166 | fnd=lst; |
| 167 | } else { |
| 168 | fnd=range(a,n); |
| 169 | if (!fnd) |
| 170 | return nullptr; |
| 171 | } |
| 172 | } |
| 173 | assert((fnd->min <= n) && (n <= fnd->max)); |
| 174 | return fnd->supports(n_words,n); |
| 175 | } |
| 176 | |
| 177 | template<class View, bool pos> |
| 178 | forceinline void |
no test coverage detected