diff options
Diffstat (limited to 'map')
-rw-r--r-- | map/bookmark.hpp | 12 | ||||
-rw-r--r-- | map/place_page_info.cpp | 2 |
2 files changed, 9 insertions, 5 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(); }; diff --git a/map/place_page_info.cpp b/map/place_page_info.cpp index 20a5b97ba9..8e63bc5803 100644 --- a/map/place_page_info.cpp +++ b/map/place_page_info.cpp @@ -107,7 +107,7 @@ string Info::FormatStars() const string Info::GetFormattedCoordinate(bool isDMS) const { - auto const ll = GetLatLon(); + auto const & ll = GetLatLon(); return isDMS ? measurement_utils::FormatLatLon(ll.lat, ll.lon) : measurement_utils::FormatLatLonAsDMS(ll.lat, ll.lon, 2); } |