X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fucioption.cpp;h=2185edf07c881ab6fe694fa6d2cfc5a44f6f9742;hp=1b8665546a20297d1047c564db736cec0f7800ea;hb=0d88b832e38430e0add9c8298458569b23e102a7;hpb=73be819426a9bf434d4c5fae1f807da565e3697d diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 1b866554..2185edf0 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -125,6 +125,7 @@ namespace { o["Threads"] = Option(1, 1, 8); o["Hash"] = Option(32, 4, 4096); o["Clear Hash"] = Option(false, BUTTON); + o["New Game"] = Option(false, BUTTON); o["Ponder"] = Option(true); o["OwnBook"] = Option(true); o["MultiPV"] = Option(1, 1, 500); @@ -169,6 +170,18 @@ namespace { return ret; } + // Specialization for std::string where instruction 'ss >> ret;' + // would erroneusly tokenize a string with spaces. + + template<> + string get_option_value(const string& optionName) { + + if (options.find(optionName) == options.end()) + return string(); + + return options[optionName].currentValue; + } + } ////