| 315 | } |
| 316 | |
| 317 | std::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 | |
| 345 | void Classificator::ReadClassificator(std::istream & s) |
| 346 | { |
no test coverage detected