Skip to content

Commit

Permalink
utils.h: added bool_to_string()
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Aug 28, 2023
1 parent 7cf2165 commit ab1145b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ab1145b

Please sign in to comment.