forked from organicmaps/organicmaps
Remove duplicated types
This commit is contained in:
parent
072cac5e24
commit
671560f497
1 changed files with 5 additions and 0 deletions
|
@ -360,6 +360,11 @@ bool FeatureParams::FinishAddingTypes()
|
|||
newTypes.push_back(candidate);
|
||||
}
|
||||
|
||||
// Remove duplicated types.
|
||||
sort(newTypes.begin(), newTypes.end());
|
||||
auto last = unique(newTypes.begin(), newTypes.end());
|
||||
newTypes.erase(last, newTypes.end());
|
||||
|
||||
m_Types.swap(newTypes);
|
||||
|
||||
if (m_Types.size() > max_types_count)
|
||||
|
|
Loading…
Add table
Reference in a new issue