forked from organicmaps/organicmaps
[core] remove dublicates
This commit is contained in:
parent
d5a2a73d32
commit
c4d55adf15
1 changed files with 6 additions and 0 deletions
|
@ -66,6 +66,12 @@ void ActiveMapsLayout::Init(vector<string> const & maps)
|
|||
};
|
||||
|
||||
sort(m_items.begin(), m_items.end(), comparatorFn);
|
||||
auto uniqPredicate = [](Item const & item1, Item const & item2)
|
||||
{
|
||||
return item1.m_index == item2.m_index;
|
||||
};
|
||||
|
||||
m_items.erase(unique(m_items.begin(), m_items.end(), uniqPredicate), m_items.end());
|
||||
|
||||
m_split = { 0, m_items.size() };
|
||||
for (size_t i = 0; i < m_items.size(); ++i)
|
||||
|
|
Loading…
Add table
Reference in a new issue