diff options
Diffstat (limited to 'third_party/jpeg-xl/lib/jxl/bits_test.cc')
-rw-r--r-- | third_party/jpeg-xl/lib/jxl/bits_test.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/third_party/jpeg-xl/lib/jxl/bits_test.cc b/third_party/jpeg-xl/lib/jxl/bits_test.cc index bd7aa548c8..45db8c0d6e 100644 --- a/third_party/jpeg-xl/lib/jxl/bits_test.cc +++ b/third_party/jpeg-xl/lib/jxl/bits_test.cc @@ -38,7 +38,8 @@ TEST(BitsTest, TestFloorLog2) { const size_t expected[7] = {0, 1, 1, 2, 2, 2, 2}; for (uint32_t i = 1; i <= 7; ++i) { EXPECT_EQ(expected[i - 1], FloorLog2Nonzero(i)) << " " << i; - EXPECT_EQ(expected[i - 1], FloorLog2Nonzero(uint64_t(i))) << " " << i; + EXPECT_EQ(expected[i - 1], FloorLog2Nonzero(static_cast<uint64_t>(i))) + << " " << i; } EXPECT_EQ(11u, FloorLog2Nonzero(0x00000fffu)); // 4095 @@ -63,7 +64,8 @@ TEST(BitsTest, TestCeilLog2) { const size_t expected[7] = {0, 1, 2, 2, 3, 3, 3}; for (uint32_t i = 1; i <= 7; ++i) { EXPECT_EQ(expected[i - 1], CeilLog2Nonzero(i)) << " " << i; - EXPECT_EQ(expected[i - 1], CeilLog2Nonzero(uint64_t(i))) << " " << i; + EXPECT_EQ(expected[i - 1], CeilLog2Nonzero(static_cast<uint64_t>(i))) + << " " << i; } EXPECT_EQ(12u, CeilLog2Nonzero(0x00000fffu)); // 4095 |