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/coding
diff options
context:
space:
mode:
authorMaksim Andrianov <maksimandrianov1@gmail.com>2018-06-22 20:34:26 +0300
committerMaksim Andrianov <maksimandrianov1@gmail.com>2018-06-25 17:58:40 +0300
commit5ea4f835145fe8edfa6facc32e15c46452450e48 (patch)
tree94d2ce40239f76f023126f53bee456b304be5455 /coding
parent2a8cf2837351996c39bd5e43843c21009f033f5c (diff)
Review fixes
Diffstat (limited to 'coding')
-rw-r--r--coding/compressed_bit_vector.cpp3
-rw-r--r--coding/point_to_integer.cpp6
-rw-r--r--coding/zlib.cpp3
3 files changed, 4 insertions, 8 deletions
diff --git a/coding/compressed_bit_vector.cpp b/coding/compressed_bit_vector.cpp
index 01ed947c15..45b00abdcb 100644
--- a/coding/compressed_bit_vector.cpp
+++ b/coding/compressed_bit_vector.cpp
@@ -461,8 +461,7 @@ string DebugPrint(CompressedBitVector::StorageStrategy strat)
case CompressedBitVector::StorageStrategy::Dense: return "Dense";
case CompressedBitVector::StorageStrategy::Sparse: return "Sparse";
}
-
- INCORRECT_VALUE_IN_THE_SWITCH();
+ CHECK_SWITCH();
}
// static
diff --git a/coding/point_to_integer.cpp b/coding/point_to_integer.cpp
index 39d9cb583c..2e809e7bf1 100644
--- a/coding/point_to_integer.cpp
+++ b/coding/point_to_integer.cpp
@@ -8,8 +8,7 @@ int64_t PointToInt64Obsolete(double x, double y, uint32_t coordBits)
int64_t const res = static_cast<int64_t>(PointUToUint64Obsolete(PointDToPointU(x, y, coordBits)));
ASSERT_GREATER_OR_EQUAL(res, 0, ("Highest bits of (ix, iy) are not used, so res should be > 0."));
- ASSERT_LESS_OR_EQUAL(static_cast<uint64_t>(res),
- static_cast<uint64_t>(3ULL << 2 * POINT_COORD_BITS), ());
+ ASSERT_LESS_OR_EQUAL(static_cast<uint64_t>(res), uint64_t{3} << 2 * POINT_COORD_BITS, ());
return res;
}
@@ -21,8 +20,7 @@ int64_t PointToInt64Obsolete(m2::PointD const & pt, uint32_t coordBits)
m2::PointD Int64ToPointObsolete(int64_t v, uint32_t coordBits)
{
ASSERT_GREATER_OR_EQUAL(v, 0, ("Highest bits of (ix, iy) are not used, so res should be > 0."));
- ASSERT_LESS_OR_EQUAL(static_cast<uint64_t>(v),
- static_cast<uint64_t>(3ULL << 2 * POINT_COORD_BITS), ());
+ ASSERT_LESS_OR_EQUAL(static_cast<uint64_t>(v), uint64_t{3} << 2 * POINT_COORD_BITS, ());
return PointUToPointD(Uint64ToPointUObsolete(static_cast<uint64_t>(v)), coordBits);
}
diff --git a/coding/zlib.cpp b/coding/zlib.cpp
index 80b3c7ece5..9b156cd629 100644
--- a/coding/zlib.cpp
+++ b/coding/zlib.cpp
@@ -19,8 +19,7 @@ int ToInt(ZLib::Deflate::Level level)
case Level::BestCompression: return Z_BEST_COMPRESSION;
case Level::DefaultCompression: return Z_DEFAULT_COMPRESSION;
}
-
- INCORRECT_VALUE_IN_THE_SWITCH();
+ CHECK_SWITCH();
}
} // namespace