diff options
author | vng <viktor.govako@gmail.com> | 2014-07-04 21:57:08 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:19:27 +0300 |
commit | 2ff0db6833154ef27c9d11a191fc340c988df88f (patch) | |
tree | b1e9f590bb2a3d5ba10f3b6d18a718b03f9412a1 /map/user_mark_container.cpp | |
parent | 43000502e3b1dd5c248e8e42d4551cb19745a0f7 (diff) |
Fix first search results when “Search on map”.
Diffstat (limited to 'map/user_mark_container.cpp')
-rw-r--r-- | map/user_mark_container.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/map/user_mark_container.cpp b/map/user_mark_container.cpp index e9ed1c7c9b..933c05a26c 100644 --- a/map/user_mark_container.cpp +++ b/map/user_mark_container.cpp @@ -152,9 +152,13 @@ void UserMarkContainer::Draw(PaintOverlayEvent const & e, UserMarkDLCache * cach } } -void UserMarkContainer::Clear() +void UserMarkContainer::Clear(size_t skipCount/* = 0*/) { - DeleteRange(m_userMarks, DeleteFunctor()); + for (size_t i = skipCount; i < m_userMarks.size(); ++i) + delete m_userMarks[i]; + + if (skipCount < m_userMarks.size()) + m_userMarks.erase(m_userMarks.begin() + skipCount, m_userMarks.end()); } namespace |