]> git.sesse.net Git - stockfish/commit
Fix Hash in bench
authorlucasart <lucas.braesch@gmail.com>
Thu, 7 Aug 2014 10:51:07 +0000 (18:51 +0800)
committerlucasart <lucas.braesch@gmail.com>
Thu, 7 Aug 2014 10:51:07 +0000 (18:51 +0800)
commit6044f25d7104c25e0218831027eade75e092ed0c
treed790cc44d0e30e05514f6f0b2a4ff139414a1055
parent9da015517c20e9c5b8e0ef6e7103e60404211baa
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