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 82d6b83 commit b0770f6
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 @@ -335,4 +335,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 b0770f6

Please sign in to comment.