From fb4bbd78782c17c0a071df5f91e6d796a3547209 Mon Sep 17 00:00:00 2001 From: firewave Date: Wed, 23 Aug 2023 16:12:53 +0200 Subject: [PATCH] utils.h: added `bool_to_string()` --- lib/utils.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/utils.h b/lib/utils.h index fab7471bf231..919456802eb6 100644 --- a/lib/utils.h +++ b/lib/utils.h @@ -325,4 +325,9 @@ static inline std::string ptr_to_string(const void* p) #endif } +static inline std::string bool_to_string(bool b) +{ + return b ? "true" : "false"; +} + #endif