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/base
diff options
context:
space:
mode:
authorMaxim Pimenov <m@maps.me>2018-08-13 14:01:32 +0300
committerVladimir Byko-Ianko <bykoianko@gmail.com>2018-08-21 15:01:31 +0300
commite6132283c0d5b4de4432d2c6dffd4e6a4abfdd9b (patch)
treeed59cd5b065637e5671ea9e1fea3cdc01b310b91 /base
parentfdebef29b0532388f2689d162971a43f379c0cf5 (diff)
Review fixes.
Diffstat (limited to 'base')
-rw-r--r--base/geo_object_id.cpp2
-rw-r--r--base/geo_object_id.hpp5
2 files changed, 3 insertions, 4 deletions
diff --git a/base/geo_object_id.cpp b/base/geo_object_id.cpp
index 4749c4442d..8b7b3a3fc9 100644
--- a/base/geo_object_id.cpp
+++ b/base/geo_object_id.cpp
@@ -6,7 +6,7 @@
namespace
{
-// todo(@m) Uncomment when the transition from osm::id to base::GeoObjectId is complete
+// todo(@m) Uncomment when the transition from osm::Id to base::GeoObjectId is complete
// and add assertions about the highest bit.
// The old scheme used the highest bit and the new one does not.
// uint64_t const kTypeMask = 0x7F00000000000000;
diff --git a/base/geo_object_id.hpp b/base/geo_object_id.hpp
index bdc524e824..0ad64536c2 100644
--- a/base/geo_object_id.hpp
+++ b/base/geo_object_id.hpp
@@ -19,7 +19,7 @@ namespace base
// Another byte is reserved and the last 6 bytes leave us with 2^48 possible values that can be
// used for ids within a source.
// Typically, the reserved byte will be zero but it may be used in future if the format changes.
-// At the time of writing, OSM has approximately 2^32 different nodes with ids starting
+// At the time of writing (August 2018), OSM has approximately 2^32 different nodes with ids starting
// from one (https://wiki.openstreetmap.org/wiki/Stats) and this is by far the largest
// serial numbers that we use.
// The highest bit is zero so that the resulting number is positive if read as a signed 64-bit
@@ -76,7 +76,6 @@ public:
bool operator<(GeoObjectId const & other) const { return m_encodedId < other.m_encodedId; }
bool operator==(GeoObjectId const & other) const { return m_encodedId == other.m_encodedId; }
bool operator!=(GeoObjectId const & other) const { return !(*this == other); }
- bool operator==(uint64_t other) const { return GetSerialId() == other; }
private:
uint64_t m_encodedId;
@@ -86,7 +85,7 @@ struct HashGeoObjectId : private std::hash<uint64_t>
{
size_t operator()(GeoObjectId const & id) const
{
- return std::hash<uint64_t>::operator()(id.GetSerialId());
+ return std::hash<uint64_t>::operator()(id.GetEncodedId());
}
};