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

Method FinishAddingTypesEx

libs/indexer/feature_data.cpp:417–439  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

415}
416
417FeatureParams::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
441std::string FeatureParams::PrintTypes()
442{

Callers 1

GetNameAndTypeFunction · 0.80

Calls 9

SortUniqueFunction · 0.85
SortUselessToEndMethod · 0.80
sizeMethod · 0.45
resizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
IsEmptyMethod · 0.45
ClearMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected