1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-11-26 10:55:29 +01:00

Add nodiscard attribute to helper functions where it makes sense

This commit is contained in:
sfan5
2025-03-26 21:56:09 +01:00
parent e6acc4e7ed
commit ae0f955a0e
10 changed files with 71 additions and 29 deletions

View File

@@ -9,6 +9,7 @@
static const char hex_chars[] = "0123456789abcdef";
[[nodiscard]]
static inline std::string hex_encode(std::string_view data)
{
std::string ret;
@@ -20,6 +21,7 @@ static inline std::string hex_encode(std::string_view data)
return ret;
}
[[nodiscard]]
static inline std::string hex_encode(const char *data, size_t data_size)
{
if (!data_size)