summaryrefslogtreecommitdiff
path: root/src/string_func.h
diff options
context:
space:
mode:
authorHenry Wilson <m3henry@googlemail.com>2019-04-10 22:07:06 +0100
committerMichael Lutz <michi@icosahedron.de>2019-04-10 23:22:20 +0200
commit7c8e7c6b6e16d4a26259a676db32d8776b99817e (patch)
tree99f134b7e66367cf11e10bc5061896eab4a3264f /src/string_func.h
parent3b4f224c0bc50e7248050d4bcbb6d83fd510c1cc (diff)
downloadopenttd-7c8e7c6b6e16d4a26259a676db32d8776b99817e.tar.xz
Codechange: Use null pointer literal instead of the NULL macro
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 ff12f3747..1f622870e 100644
--- a/src/string_func.h
+++ b/src/string_func.h
@@ -33,7 +33,7 @@
char *strecat(char *dst, const char *src, const char *last);
char *strecpy(char *dst, const char *src, const char *last);
-char *stredup(const char *src, const char *last = NULL);
+char *stredup(const char *src, const char *last = nullptr);
int CDECL seprintf(char *str, const char *last, const char *format, ...) WARN_FORMAT(3, 4);
int CDECL vseprintf(char *str, const char *last, const char *format, va_list ap);
@@ -54,11 +54,11 @@ bool StrValid(const char *str, const char *last);
*
* @param s The pointer to the first element of the buffer
* @return true if the buffer starts with the terminating null-character or
- * if the given pointer points to NULL else return false
+ * if the given pointer points to nullptr else return false
*/
static inline bool StrEmpty(const char *s)
{
- return s == NULL || s[0] == '\0';
+ return s == nullptr || s[0] == '\0';
}
/**