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

Method GetDrawScaleRange

libs/indexer/classificator.cpp:317–343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

315}
316
317std::pair<int, int> ClassifObject::GetDrawScaleRange() const
318{
319 if (!IsDrawableAny())
320 return {-1, -1};
321
322 int const count = static_cast<int>(m_visibility.size());
323
324 int left = -1;
325 for (int i = 0; i < count; ++i)
326 if (m_visibility[i])
327 {
328 left = i;
329 break;
330 }
331
332 ASSERT_NOT_EQUAL(left, -1, ());
333
334 int right = left;
335 for (int i = count - 1; i > left; --i)
336 if (m_visibility[i])
337 {
338 right = i;
339 break;
340 }
341
342 return {left, right};
343}
344
345void Classificator::ReadClassificator(std::istream & s)
346{

Callers 1

GetDrawableScaleRangeFunction · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected