File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 66
77#include < crypto/sha256.h>
88#include < key.h>
9- #include < validation.h>
10- #include < util.h>
119#include < random.h>
12-
13- #include < boost/lexical_cast.hpp>
10+ #include < util.h>
11+ #include < utilstrencodings.h>
12+ #include < validation.h>
1413
1514#include < memory>
1615
@@ -64,8 +63,11 @@ int main(int argc, char** argv)
6463 std::string scaling_str = gArgs .GetArg (" -scaling" , DEFAULT_BENCH_SCALING);
6564 bool is_list_only = gArgs .GetBoolArg (" -list" , false );
6665
67- double scaling_factor = boost::lexical_cast<double >(scaling_str);
68-
66+ double scaling_factor;
67+ if (!ParseDouble (scaling_str, &scaling_factor)) {
68+ fprintf (stderr, " Error parsing scaling factor as double: %s\n " , scaling_str.c_str ());
69+ return EXIT_FAILURE;
70+ }
6971
7072 std::unique_ptr<benchmark::Printer> printer (new benchmark::ConsolePrinter ());
7173 std::string printer_arg = gArgs .GetArg (" -printer" , DEFAULT_BENCH_PRINTER);
You can’t perform that action at this time.
0 commit comments