mirror of
https://github.com/google/benchmark.git
synced 2024-12-27 04:50:19 +08:00
fix some build warnings on type conversions
This commit is contained in:
parent
108ca84820
commit
920fa14898
@ -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);
|
||||
}
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user