| 409 | } // namespace |
| 410 | |
| 411 | pair<int, int> GetDrawableScaleRangeForRules(TypesHolder const & types, int rules) |
| 412 | { |
| 413 | int constexpr upBound = scales::GetUpperStyleScale(); |
| 414 | int lowL = -1; |
| 415 | for (int level = 0; level <= upBound; ++level) |
| 416 | { |
| 417 | if (IsDrawableForRules(types, level, rules)) |
| 418 | { |
| 419 | lowL = level; |
| 420 | break; |
| 421 | } |
| 422 | } |
| 423 | |
| 424 | if (lowL == -1) |
| 425 | return kInvalidScalesRange; |
| 426 | |
| 427 | int highL = lowL; |
| 428 | for (int level = upBound; level > lowL; --level) |
| 429 | { |
| 430 | if (IsDrawableForRules(types, level, rules)) |
| 431 | { |
| 432 | highL = level; |
| 433 | break; |
| 434 | } |
| 435 | } |
| 436 | |
| 437 | return {lowL, highL}; |
| 438 | } |
| 439 | |
| 440 | TypeSetChecker::TypeSetChecker(initializer_list<char const *> const & lst) |
| 441 | { |