diff options
author | Anatoly Serdtcev <serdtcev@maps.me> | 2018-12-26 15:43:53 +0300 |
---|---|---|
committer | Tatiana Yan <tatiana.kondakova@gmail.com> | 2018-12-26 16:05:19 +0300 |
commit | 67ece8a2a39df1f7afabdb6119036d200d0c9504 (patch) | |
tree | 9514cb0529c1fa9967fd1068b20b2d8cded69cb7 /geometry | |
parent | 551350b20ee48f54fb06067a8a090932e2f7aab0 (diff) |
[base][geocoder] Fix compile warnings for gcc 8
Diffstat (limited to 'geometry')
-rw-r--r-- | geometry/cellid.hpp | 2 | ||||
-rw-r--r-- | geometry/geometry_tests/cellid_test.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/geometry/cellid.hpp b/geometry/cellid.hpp index 826058f46f..d648a7356a 100644 --- a/geometry/cellid.hpp +++ b/geometry/cellid.hpp @@ -274,7 +274,7 @@ public: bits <<= 2; ++level; uint64_t const subtreeSize = TreeSizeForDepth(depth - level); - for (--v; v > subtreeSize; v -= subtreeSize) + for (--v; static_cast<uint64_t>(v) > subtreeSize; v -= subtreeSize) ++bits; } return CellId(bits, level); diff --git a/geometry/geometry_tests/cellid_test.cpp b/geometry/geometry_tests/cellid_test.cpp index 564561c5b2..5ed2565fc4 100644 --- a/geometry/geometry_tests/cellid_test.cpp +++ b/geometry/geometry_tests/cellid_test.cpp @@ -216,9 +216,9 @@ UNIT_TEST(CellId_ToAndFromInt64ZOrder) using Id = m2::CellId<kMaxDepth>; for (int depth = 1; depth <= kMaxDepth; ++depth) { - uint64_t const treeSize = ((uint64_t{1} << (2 * depth)) - 1) / 3; + int64_t const treeSize = ((int64_t{1} << (2 * depth)) - 1) / 3; LOG(LINFO, ("Depth =", depth, " TreeSize =", treeSize)); - for (uint64_t id = 1; id <= treeSize; ++id) + for (int64_t id = 1; id <= treeSize; ++id) { auto const cell = Id::FromInt64ZOrder(id, depth); TEST_EQUAL(id, cell.ToInt64ZOrder(depth), ()); |