X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fucioption.cpp;h=c31a49e78ae9b62e4cbfb7872baf0edf8db31c1a;hp=49e8f228ee36ab039b73cc514b69533556a93685;hb=fad772f38753ef3f0ac745ace5f339073a6517b6;hpb=ebb0f31928621115037779ba14311d1ec8b90542 diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 49e8f228..c31a49e7 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -167,13 +167,6 @@ namespace { return ss.str(); } - // We want conversion from a bool value to be "true" or "false", - // not "1" or "0", so add a specialization for bool type. - template<> - std::string stringify(const bool& v) { - - return v ? "true" : "false"; - } // get_option_value implements the various get_option_value_ // functions defined later, because only the option value @@ -191,19 +184,6 @@ namespace { return ret; } - // Unfortunatly we need a specialization to convert "false" and "true" - // to proper bool values. The culprit is that we use a non standard way - // to store a bool value in a string, in particular we use "false" and - // "true" instead of "0" and "1" due to how UCI protocol works. - - template<> - bool get_option_value(const std::string& optionName) { - - if (options.find(optionName) == options.end()) - return false; - - return options[optionName].currentValue == "true"; - } } //// @@ -258,24 +238,27 @@ void print_uci_options() { for (std::vector