summaryrefslogtreecommitdiff
path: root/src/string_func.h
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-03-15 13:21:31 +0000
committersmatz <smatz@openttd.org>2008-03-15 13:21:31 +0000
commit1f13638d03d946989cd4e94ea61e744d4e700392 (patch)
tree430a2db18c790d538b3473d93a0c95f2afbdde7d /src/string_func.h
parent8d7f246b55fc62dc06c7af2530ad98cf6737fe8f (diff)
downloadopenttd-1f13638d03d946989cd4e94ea61e744d4e700392.tar.xz
(svn r12368) -Codechange: use explicit body for loops and conditions and remove -Wno-empty-body from the configure script
Diffstat (limited to 'src/string_func.h')
-rw-r--r--src/string_func.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/string_func.h b/src/string_func.h
index 074dc0837..3a4303293 100644
--- a/src/string_func.h
+++ b/src/string_func.h
@@ -48,7 +48,7 @@ static inline bool StrEmpty(const char *s) { return s == NULL || s[0] == '\0'; }
static inline int ttd_strnlen(const char *str, int maxlen)
{
const char *t;
- for (t = str; *t != '\0' && t - str < maxlen; t++);
+ for (t = str; *t != '\0' && t - str < maxlen; t++) {}
return t - str;
}
@@ -128,7 +128,7 @@ static inline bool IsUtf8Part(char c)
static inline char *Utf8PrevChar(const char *s)
{
const char *ret = s;
- while (IsUtf8Part(*--ret));
+ while (IsUtf8Part(*--ret)) {}
return (char*)ret;
}