projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
35010b4
)
ucioptions: Fix stringification of a bool
author
Marco Costalba
<mcostalba@gmail.com>
Mon, 1 Sep 2008 14:58:02 +0000 (16:58 +0200)
committer
Marco Costalba
<mcostalba@gmail.com>
Mon, 1 Sep 2008 14:58:02 +0000 (16:58 +0200)
We want stringify a bool as "true" and "false",
not "1" and "0".
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/ucioption.cpp
patch
|
blob
|
history
diff --git
a/src/ucioption.cpp
b/src/ucioption.cpp
index
37c0d40
..
cc19e23
100644
(file)
--- 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) {}