diff options
author | Yuri Gorshenin <y@maps.me> | 2015-02-04 11:24:30 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:37:10 +0300 |
commit | 994873c081cf1a0e37f19d3544c2487f2ee13ab8 (patch) | |
tree | d81c7f5335c3f0f580b255afc065b1cd616c4135 /map/bookmark.hpp | |
parent | 7fd7b95f35f9720c8636b8959f056d6d2f6f9ec7 (diff) |
Fixed bookmarks order: least recently added bookmark is displayed first in the list.
Diffstat (limited to 'map/bookmark.hpp')
-rw-r--r-- | map/bookmark.hpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/map/bookmark.hpp b/map/bookmark.hpp index 4a3ada3bf9..fde150be50 100644 --- a/map/bookmark.hpp +++ b/map/bookmark.hpp @@ -142,7 +142,7 @@ public: /// @name Theese functions are called from Framework only. //@{ - void AddBookmark(m2::PointD const & ptOrg, BookmarkData const & bm); + Bookmark* AddBookmark(m2::PointD const & ptOrg, BookmarkData const & bm); void ReplaceBookmark(size_t index, BookmarkData const & bm); //@} @@ -165,6 +165,10 @@ public: Bookmark * GetBookmark(size_t index); void DeleteBookmark(size_t index); + // Returns index of the bookmark if exists, otherwise returns + // total number of bookmarks. + size_t FindBookmark(Bookmark const * bookmark) const; + /// @name Theese fuctions are public for unit tests only. /// You don't need to call them from client code. //@{ |