| 415 | } |
| 416 | |
| 417 | FeatureParams::TypesResult FeatureParams::FinishAddingTypesEx() |
| 418 | { |
| 419 | base::SortUnique(m_types); |
| 420 | |
| 421 | TypesResult res = TYPES_GOOD; |
| 422 | |
| 423 | if (m_types.size() > kMaxTypesCount) |
| 424 | { |
| 425 | UselessTypesChecker::Instance().SortUselessToEnd(m_types); |
| 426 | |
| 427 | m_types.resize(kMaxTypesCount); |
| 428 | sort(m_types.begin(), m_types.end()); |
| 429 | |
| 430 | res = TYPES_EXCEED_MAX; |
| 431 | } |
| 432 | |
| 433 | // Patch fix that removes house number from localities. |
| 434 | /// @todo move this fix elsewhere (osm2type.cpp?) |
| 435 | if (!house.IsEmpty() && ftypes::IsLocalityChecker::Instance()(m_types)) |
| 436 | house.Clear(); |
| 437 | |
| 438 | return (m_types.empty() ? TYPES_EMPTY : res); |
| 439 | } |
| 440 | |
| 441 | std::string FeatureParams::PrintTypes() |
| 442 | { |
no test coverage detected