From e5bb64c086ceb30af74576050976e18040a75c51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AF=85?= Date: Mon, 17 Dec 2018 19:00:56 +0800 Subject: [PATCH] Replace atof to strtof --- mace/core/runtime/cpu/cpu_runtime.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mace/core/runtime/cpu/cpu_runtime.cc b/mace/core/runtime/cpu/cpu_runtime.cc index 67215b8d..f9baac6e 100644 --- a/mace/core/runtime/cpu/cpu_runtime.cc +++ b/mace/core/runtime/cpu/cpu_runtime.cc @@ -84,7 +84,7 @@ int GetCPUMaxFreq(std::vector *max_freqs) { } std::string line; if (std::getline(f, line)) { - float freq = atof(line.c_str()); + float freq = strtof(line.c_str(), nullptr); max_freqs->push_back(freq); } if (f.bad()) { -- GitLab