summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2017-06-16 10:48:54 +0200
committerlouiz’ <louiz@louiz.org>2017-06-16 10:48:54 +0200
commite75d7ad8ea72044fdfd2317e03f91ba5bea06b86 (patch)
treed6e289cd1026bfcd346956f4eaa378c893119700 /src/utils
parent40db183e3753486deaa43e950fff38579c5ced6f (diff)
downloadbiboumi-e75d7ad8ea72044fdfd2317e03f91ba5bea06b86.tar.gz
biboumi-e75d7ad8ea72044fdfd2317e03f91ba5bea06b86.tar.bz2
biboumi-e75d7ad8ea72044fdfd2317e03f91ba5bea06b86.tar.xz
biboumi-e75d7ad8ea72044fdfd2317e03f91ba5bea06b86.zip
Add a Record History option in the Channel configuration form
fix #3269
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/optional_bool.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/utils/optional_bool.hpp b/src/utils/optional_bool.hpp
index 824e76d..59bbbab 100644
--- a/src/utils/optional_bool.hpp
+++ b/src/utils/optional_bool.hpp
@@ -20,6 +20,16 @@ struct OptionalBool
this->is_set = false;
}
+ std::string to_string()
+ {
+ if (this->is_set == false)
+ return "unset";
+ else if (this->value)
+ return "true";
+ else
+ return "false";
+ }
+
bool is_set{false};
bool value{false};
};