Fixed int64 to double cast warning.

This commit is contained in:
Anton Danielsson 2015-10-05 14:00:20 +02:00
parent ba141ac0d9
commit 96ca9a7aba
1 changed files with 2 additions and 2 deletions

View File

@ -243,9 +243,9 @@ void InitializeSystemInfo() {
SHGetValueA(HKEY_LOCAL_MACHINE,
"HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0",
"~MHz", nullptr, &data, &data_size)))
cpuinfo_cycles_per_second = (int64_t)data * (int64_t)(1000 * 1000); // was mhz
cpuinfo_cycles_per_second = static_cast<double>((int64_t)data * (int64_t)(1000 * 1000)); // was mhz
else
cpuinfo_cycles_per_second = EstimateCyclesPerSecond();
cpuinfo_cycles_per_second = static_cast<double>(EstimateCyclesPerSecond());
// TODO: also figure out cpuinfo_num_cpus
#elif defined BENCHMARK_OS_MACOSX