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

Function EatFid

libs/search/processor.cpp:84–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84bool EatFid(string & s, uint32_t & fid)
85{
86 TrimLeadingSpaces(s);
87
88 if (s.empty())
89 return false;
90
91 size_t i = 0;
92 while (i < s.size() && isdigit(s[i]))
93 ++i;
94
95 auto const prefix = s.substr(0, i);
96 if (strings::to_uint32(prefix, fid))
97 {
98 s = s.substr(prefix.size());
99 return true;
100 }
101 return false;
102}
103
104bool EatMwmName(base::MemTrie<storage::CountryId, base::VectorValues<bool>> const & countriesTrie, string & s,
105 storage::CountryId & mwmName)

Callers 1

SearchByFeatureIdMethod · 0.85

Calls 4

TrimLeadingSpacesFunction · 0.85
to_uint32Function · 0.85
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected