mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
ucioptions: Fix stringification of a bool
We want stringify a bool as "true" and "false", not "1" and "0". Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
35010b4938
commit
e5068c4734
1 changed files with 6 additions and 0 deletions
|
@ -305,6 +305,12 @@ namespace {
|
||||||
return ss.str();
|
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)
|
Option::Option(const char* nm, const char* def, OptionType t)
|
||||||
: name(nm), defaultValue(def), currentValue(def), type(t), minValue(0), maxValue(0) {}
|
: name(nm), defaultValue(def), currentValue(def), type(t), minValue(0), maxValue(0) {}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue