diff options
author | VladiMihaylenko <vxmihaylenko@gmail.com> | 2016-10-06 14:19:33 +0300 |
---|---|---|
committer | VladiMihaylenko <vxmihaylenko@gmail.com> | 2016-10-18 18:21:41 +0300 |
commit | 1ab061d3ac12f63d95c023da57148dbf45dc2c2a (patch) | |
tree | 78b18c50cd8b4db99225b81e139ff967ddc86d9f /map/bookmark.hpp | |
parent | 54798069b30de479fd804e44a1a036ea3db1c753 (diff) |
[ios] Review fixes
Diffstat (limited to 'map/bookmark.hpp')
-rw-r--r-- | map/bookmark.hpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/map/bookmark.hpp b/map/bookmark.hpp index 2fb0280e6b..ba2ad7c232 100644 --- a/map/bookmark.hpp +++ b/map/bookmark.hpp @@ -183,11 +183,15 @@ protected: struct BookmarkAndCategory { BookmarkAndCategory() = default; - BookmarkAndCategory(int bookmarkIndex, int categoryIndex) : m_bookmarkIndex(bookmarkIndex), + BookmarkAndCategory(size_t bookmarkIndex, size_t categoryIndex) : m_bookmarkIndex(bookmarkIndex), m_categoryIndex(categoryIndex) {} - bool IsValid() const { return m_bookmarkIndex >= 0 && m_categoryIndex >= 0; }; + bool IsValid() const + { + return m_bookmarkIndex != numeric_limits<size_t>::max() && + m_categoryIndex != numeric_limits<size_t>::max(); + }; - int m_bookmarkIndex = -1; - int m_categoryIndex = -1; + size_t m_bookmarkIndex = numeric_limits<size_t>::max(); + size_t m_categoryIndex = numeric_limits<size_t>::max(); }; |