summaryrefslogtreecommitdiff
path: root/src/string_func.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-05-24 20:29:04 +0000
committerrubidium <rubidium@openttd.org>2009-05-24 20:29:04 +0000
commit0d99b6c71cd096599b4805d230483f3e4e958af1 (patch)
tree463b69c3b2ea6f697506be055622229767dfebc4 /src/string_func.h
parent36e71c8df6fe1f4c303d98b609bb9cdd0c4b7e75 (diff)
downloadopenttd-0d99b6c71cd096599b4805d230483f3e4e958af1.tar.xz
(svn r16421) -Codechange: do not unnecessarily remove constness or unnecessarily add it.
Diffstat (limited to 'src/string_func.h')
-rw-r--r--src/string_func.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/string_func.h b/src/string_func.h
index 10203047b..fbf532b7a 100644
--- a/src/string_func.h
+++ b/src/string_func.h
@@ -208,11 +208,11 @@ static inline bool IsUtf8Part(char c)
* @note The function should not be used to determine the length of the previous
* encoded char because it might be an invalid/corrupt start-sequence
*/
-static inline char *Utf8PrevChar(const char *s)
+static inline char *Utf8PrevChar(char *s)
{
- const char *ret = s;
+ char *ret = s;
while (IsUtf8Part(*--ret)) {}
- return (char*)ret;
+ return ret;
}