fix some build warnings on type conversions

This commit is contained in:
Dominic Hamon 2022-06-08 10:32:20 +01:00
parent 108ca84820
commit 920fa14898
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ typename std::vector<T>::iterator AddPowers(std::vector<T>* dst, T lo, T hi,
static const T kmax = std::numeric_limits<T>::max();
// Space out the values in multiples of "mult"
for (T i = static_cast<T>(1); i <= hi; i *= mult) {
for (T i = static_cast<T>(1); i <= hi; i *= static_cast<T>(mult)) {
if (i >= lo) {
dst->push_back(i);
}

View File

@ -174,7 +174,7 @@ BENCHMARK(BM_Complexity_O_N_log_N)
->RangeMultiplier(2)
->Range(1 << 10, 1 << 16)
->Complexity([](benchmark::IterationCount n) {
return kLog2E * n * log(static_cast<double>(n));
return kLog2E * static_cast<double>(n) * log(static_cast<double>(n));
});
BENCHMARK(BM_Complexity_O_N_log_N)
->RangeMultiplier(2)