Fix precision loss warning in MSVC. (#574)

This commit is contained in:
Victor Costan 2018-04-23 03:58:02 -07:00 committed by Dominic Hamon
parent c4858d8012
commit 64d4805dd7
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ namespace benchmark {
BigOFunc* FittingCurve(BigO complexity) {
switch (complexity) {
case oN:
return [](int64_t n) -> double { return n; };
return [](int64_t n) -> double { return static_cast<double>(n); };
case oNSquared:
return [](int64_t n) -> double { return std::pow(n, 2); };
case oNCubed: