Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/map
diff options
context:
space:
mode:
authorVladiMihaylenko <vxmihaylenko@gmail.com>2016-10-06 14:19:33 +0300
committerVladiMihaylenko <vxmihaylenko@gmail.com>2016-10-18 18:21:41 +0300
commit1ab061d3ac12f63d95c023da57148dbf45dc2c2a (patch)
tree78b18c50cd8b4db99225b81e139ff967ddc86d9f /map
parent54798069b30de479fd804e44a1a036ea3db1c753 (diff)
[ios] Review fixes
Diffstat (limited to 'map')
-rw-r--r--map/bookmark.hpp12
-rw-r--r--map/place_page_info.cpp2
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);
}