X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbenchmark.cpp;h=5d8757a61f49dd7214e48038746f0c93cdfe6ffd;hp=0417313cbb6bf3ac22ba5733cd77bda68fc3212f;hb=9546b79e204faef2e2759b481b09a97bdab0fb76;hpb=cc04a745e2f6aca12ac8373c85ae0ccafac07ffb diff --git a/src/benchmark.cpp b/src/benchmark.cpp index 0417313c..5d8757a6 100644 --- a/src/benchmark.cpp +++ b/src/benchmark.cpp @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include "misc.h" @@ -58,11 +58,11 @@ static const char* Defaults[] = { /// format (defaults are the positions defined above) and the type of the /// limit value: depth (default), time in secs or number of nodes. -void benchmark(istringstream& is) { +void benchmark(const Position& current, istream& is) { string token; Search::LimitsType limits; - vector fens(Defaults, Defaults + 16); + vector fens; // Assign default values to missing arguments string ttSize = (is >> token) ? token : "128"; @@ -83,14 +83,14 @@ void benchmark(istringstream& is) { else limits.depth = atoi(limit.c_str()); - if (fenFile == "current") - { - fens.clear(); - fens.push_back(Search::RootPosition.to_fen()); - } - else if (fenFile != "default") + if (fenFile == "default") + fens.assign(Defaults, Defaults + 16); + + else if (fenFile == "current") + fens.push_back(current.to_fen()); + + else { - fens.clear(); string fen; ifstream file(fenFile.c_str());