summaryrefslogtreecommitdiff
path: root/src/string_func.h
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-05-29 15:18:51 +0200
committerPatric Stout <github@truebrain.nl>2021-05-29 16:23:59 +0200
commit7713c3e3ccdb8dea2924cc11a7108f227e374232 (patch)
tree623b71b57bed7d3654a2b8f6cda4e988a968bfa7 /src/string_func.h
parent665e3c1f45a6ae44d4a25534b1d67816f2d1962b (diff)
downloadopenttd-7713c3e3ccdb8dea2924cc11a7108f227e374232.tar.xz
Codechange: move casting a "const char *" to "char *" to the caller
It is not nice to have your definition say you won't change a value while in fact the whole reason for your existance is to change it.
Diffstat (limited to 'src/string_func.h')
-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 be409072e..0988f01b3 100644
--- a/src/string_func.h
+++ b/src/string_func.h
@@ -41,7 +41,7 @@ char *CDECL str_fmt(const char *str, ...) WARN_FORMAT(1, 2);
void StrMakeValidInPlace(char *str, const char *last, StringValidationSettings settings = SVS_REPLACE_WITH_QUESTION_MARK) NOACCESS(2);
[[nodiscard]] std::string StrMakeValid(const std::string &str, StringValidationSettings settings = SVS_REPLACE_WITH_QUESTION_MARK);
-void StrMakeValidInPlace(const char *str, StringValidationSettings settings = SVS_REPLACE_WITH_QUESTION_MARK);
+void StrMakeValidInPlace(char *str, StringValidationSettings settings = SVS_REPLACE_WITH_QUESTION_MARK);
void str_fix_scc_encoded(char *str, const char *last) NOACCESS(2);
void str_strip_colours(char *str);