From 6044f25d7104c25e0218831027eade75e092ed0c Mon Sep 17 00:00:00 2001 From: lucasart Date: Thu, 7 Aug 2014 18:51:07 +0800 Subject: [PATCH] Fix Hash in bench The compiler tries to cast Options["Hash"] into a string, using: Option::operator std::string() const { assert(type == "string"); return currentValue; } And, as expected, the assert() fails. std::to_string() would be the right solution, but it's C++11. And using a stringstream is too much code to achieve so little. Let's keep it the way it was: hardcoded (ie. default hash defined in two places). No functional change. --- src/benchmark.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/benchmark.cpp b/src/benchmark.cpp index 7fc199f9..de8b48bb 100644 --- a/src/benchmark.cpp +++ b/src/benchmark.cpp @@ -82,7 +82,7 @@ void benchmark(const Position& current, istream& is) { vector fens; // Assign default values to missing arguments - string ttSize = (is >> token) ? token : Options["Hash"]; + string ttSize = (is >> token) ? token : "16"; string threads = (is >> token) ? token : "1"; string limit = (is >> token) ? token : "13"; string fenFile = (is >> token) ? token : "default"; -- 2.39.2