From e75d7ad8ea72044fdfd2317e03f91ba5bea06b86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Fri, 16 Jun 2017 10:48:54 +0200 Subject: Add a Record History option in the Channel configuration form fix #3269 --- src/utils/optional_bool.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/utils') 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}; }; -- cgit v1.2.3