X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fucioption.cpp;h=d1326a4c9be0b8c76f1bd86f79c5faf3d720abc3;hp=1b8665546a20297d1047c564db736cec0f7800ea;hb=ae0b96571134e640ccebcd4a79983340b9494a7a;hpb=73be819426a9bf434d4c5fae1f807da565e3697d diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 1b866554..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; + } + } ////