From ab1145be80a247ae1132cfb6182baaac5975afb3 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 575b7e2ab55..3f53f6fbc46 100644 --- a/lib/utils.h +++ b/lib/utils.h @@ -337,4 +337,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