diff --git a/src/benchmark_register.h b/src/benchmark_register.h index e0ace51ef..af644f53d 100644 --- a/src/benchmark_register.h +++ b/src/benchmark_register.h @@ -34,7 +34,7 @@ typename std::vector::iterator AddPowers(std::vector* dst, T lo, T hi, if (i > kmax / mult) break; } - return dst->begin() + static_cast(start_offset); + return dst->begin() + start_offset; } template diff --git a/src/complexity.cc b/src/complexity.cc index 8fa3f073a..952628ea7 100644 --- a/src/complexity.cc +++ b/src/complexity.cc @@ -34,9 +34,13 @@ BigOFunc* FittingCurve(BigO complexity) { case oN: return [](IterationCount n) -> double { return static_cast(n); }; case oNSquared: - return [](IterationCount n) -> double { return std::pow(n, 2); }; + return [](IterationCount n) -> double { + return std::pow(static_cast(n), 2); + }; case oNCubed: - return [](IterationCount n) -> double { return std::pow(n, 3); }; + return [](IterationCount n) -> double { + return std::pow(static_cast(n), 3); + }; case oLogN: return [](IterationCount n) -> double { return std::log2(static_cast(n));