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

Method GetBestType

libs/search/intermediate_result.cpp:216–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216uint32_t RankerResult::GetBestType(vector<uint32_t> const * preferredTypes /* = nullptr */) const
217{
218 if (preferredTypes)
219 {
220 ASSERT(is_sorted(preferredTypes->begin(), preferredTypes->end()), ());
221 for (uint32_t type : m_types)
222 if (binary_search(preferredTypes->begin(), preferredTypes->end(), type))
223 return type;
224 }
225
226 return m_types.GetBestType();
227}
228
229// RankerResult::RegionInfo ------------------------------------------------------------------------
230bool RankerResult::RegionInfo::GetCountryId(storage::CountryInfoGetter const & infoGetter,

Callers 7

IsEqualCommonMethod · 0.45
DebugPrintFunction · 0.45
RemoveDuplicatingLinearFunction · 0.45
operator()Method · 0.45
LoadFeatureMethod · 0.45
MakeResultMethod · 0.45

Calls 3

ASSERTFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected