]> git.sesse.net Git - stockfish/blobdiff - src/benchmark.cpp
Retire States global variable
[stockfish] / src / benchmark.cpp
index bf0312c206594b8d80414f6af2a3a48be9b0ce87..f61b5da31bef9783f39a9830ce72f7612b1686c1 100644 (file)
@@ -2,7 +2,7 @@
   Stockfish, a UCI chess playing engine derived from Glaurung 2.1
   Copyright (C) 2004-2008 Tord Romstad (Glaurung author)
   Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad
-  Copyright (C) 2015-2016 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad
+  Copyright (C) 2015-2017 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad
 
   Stockfish is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -109,9 +109,9 @@ void benchmark(const Position& current, istream& is) {
   string fenFile   = (is >> token) ? token : "default";
   string limitType = (is >> token) ? token : "depth";
 
-  Options["Hash"]    = ttSize;
+  Search::clear(); // Wait for search finished
   Options["Threads"] = threads;
-  Search::clear();
+  Options["Hash"]    = ttSize;
 
   if (limitType == "time")
       limits.movetime = stoi(limit); // movetime is in millisecs