Skip to content

Commit 8a620c0

Browse files
committed
Fix use of removed function
1 parent 144adec commit 8a620c0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

benchmark/ccmath_benchmark_main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ BENCHMARK(BM_ccm_unsigned_int_pow)->Args({16, 16})->Args({256, 256})->Args({4096
253253

254254
static void BM_ccm_unsigned_int_pow2(bm::State& state) {
255255
for (auto _ : state) {
256-
bm::DoNotOptimize(ccm::internal::impl::pow_expo_by_sqr2(static_cast<unsigned int>(state.range(0)), static_cast<unsigned int>(state.range(1))));
256+
bm::DoNotOptimize(ccm::internal::impl::pow_expo_by_sqr(static_cast<unsigned int>(state.range(0)), static_cast<unsigned int>(state.range(1))));
257257
}
258258
state.SetComplexityN(state.range(0));
259259
}

include/ccmath/math/power/pow.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ namespace ccm
5454
} // namespace internal
5555

5656
template <typename T>
57-
inline constexpr T pow(T x, T y) noexcept
57+
constexpr T pow(T x, T y) noexcept
5858
{
5959
if constexpr (std::is_integral_v<T> && std::is_unsigned_v<T>) { return internal::impl::pow_expo_by_sqr(x, y); }
6060
return 0;

test/power/pow_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ TEST(CcmathExponentialTests, Pow)
2626
EXPECT_EQ(ccm::pow(2.0, 6.0), std::pow(2.0, 6.0));
2727
*/
2828
unsigned int x = 2;
29-
unsigned int y = 474360680;
30-
EXPECT_EQ(ccm::internal::impl::pow_expo_by_sqr2(x, y), std::pow(x, y));
29+
unsigned int y = 2;
30+
EXPECT_EQ(ccm::internal::impl::pow_expo_by_sqr(x, y), std::pow(x, y));
3131

3232

3333
}

0 commit comments

Comments
 (0)