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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user