summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium42 <rubidium@openttd.org>2021-05-02 07:14:19 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-05-06 20:31:02 +0200
commitdc0591728739c2c8fa68dbfeb418239fbfb39383 (patch)
tree2cc17d5ba00f62acaac8fa83b7d5879c4b99f14c
parentf94fb9377910c63fc8e1ea0ede1d96603e4d8862 (diff)
downloadopenttd-dc0591728739c2c8fa68dbfeb418239fbfb39383.tar.xz
Add: [[nodiscard]] to std::string str_validate
-rw-r--r--src/string_func.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string_func.h b/src/string_func.h
index 4fe9d7b82..787fd6413 100644
--- a/src/string_func.h
+++ b/src/string_func.h
@@ -40,7 +40,7 @@ int CDECL vseprintf(char *str, const char *last, const char *format, va_list ap)
char *CDECL str_fmt(const char *str, ...) WARN_FORMAT(1, 2);
void str_validate(char *str, const char *last, StringValidationSettings settings = SVS_REPLACE_WITH_QUESTION_MARK) NOACCESS(2);
-std::string str_validate(const std::string &str, StringValidationSettings settings = SVS_REPLACE_WITH_QUESTION_MARK);
+[[nodiscard]] std::string str_validate(const std::string &str, StringValidationSettings settings = SVS_REPLACE_WITH_QUESTION_MARK);
void ValidateString(const char *str);
void str_fix_scc_encoded(char *str, const char *last) NOACCESS(2);