From e5068c4734a9a8ba6f8cdb03ec787b76755d57b2 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Mon, 1 Sep 2008 16:58:02 +0200 Subject: [PATCH] ucioptions: Fix stringification of a bool We want stringify a bool as "true" and "false", not "1" and "0". Signed-off-by: Marco Costalba --- src/ucioption.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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) {} -- 2.39.2