From: Marco Costalba Date: Mon, 1 Sep 2008 14:58:02 +0000 (+0200) Subject: ucioptions: Fix stringification of a bool X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=e5068c4734a9a8ba6f8cdb03ec787b76755d57b2;hp=35010b4938a3425ad56f97e1eae3834cb99d7326 ucioptions: Fix stringification of a bool We want stringify a bool as "true" and "false", not "1" and "0". Signed-off-by: Marco Costalba --- diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 37c0d40f..cc19e236 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -305,6 +305,12 @@ namespace { return ss.str(); } + template<> + std::string Option::stringify(const bool& v) + { + return v ? "true" : "false"; + } + Option::Option(const char* nm, const char* def, OptionType t) : name(nm), defaultValue(def), currentValue(def), type(t), minValue(0), maxValue(0) {}