X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fucioption.cpp;h=d1326a4c9be0b8c76f1bd86f79c5faf3d720abc3;hp=6e727954e68095a6896a03ac3fc5f1fbc2a4db74;hb=ae0b96571134e640ccebcd4a79983340b9494a7a;hpb=e2e249eabd2493e2bb9e5e017aafaac074a706ef diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 6e727954..d1326a4c 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -169,6 +169,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; + } + } //// @@ -210,7 +222,7 @@ void print_uci_options() { for (Options::const_iterator it = options.begin(); it != options.end(); ++it) vec.push_back(it->second); - std::stable_sort(vec.begin(), vec.end()); + std::sort(vec.begin(), vec.end()); for (std::vector