MCPcopy Create free account
hub / github.com/comaps/comaps / GetDrawableScaleRangeForRules

Function GetDrawableScaleRangeForRules

libs/indexer/feature_visibility.cpp:411–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

409} // namespace
410
411pair<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
440TypeSetChecker::TypeSetChecker(initializer_list<char const *> const & lst)
441{

Callers 5

RemoveUselessNamesMethod · 0.85
RemoveNameIfInvisibleMethod · 0.85
operator()Method · 0.85
UNIT_TESTFunction · 0.85

Calls 2

GetUpperStyleScaleFunction · 0.85
IsDrawableForRulesFunction · 0.85

Tested by 2

operator()Method · 0.68
UNIT_TESTFunction · 0.68