summaryrefslogtreecommitdiff
path: root/src/os/os2
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/os/os2
parent3b4f224c0bc50e7248050d4bcbb6d83fd510c1cc (diff)
downloadopenttd-7c8e7c6b6e16d4a26259a676db32d8776b99817e.tar.xz
Codechange: Use null pointer literal instead of the NULL macro
Diffstat (limited to 'src/os/os2')
-rw-r--r--src/os/os2/os2.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/os/os2/os2.cpp b/src/os/os2/os2.cpp
index 70c75a410..9ba6f8ef9 100644
--- a/src/os/os2/os2.cpp
+++ b/src/os/os2/os2.cpp
@@ -102,7 +102,7 @@ bool FiosGetDiskFreeSpace(const char *path, uint64 *tot)
struct diskfree_t free;
char drive = path[0] - 'A' + 1;
- if (tot != NULL && _getdiskfree(drive, &free) == 0) {
+ if (tot != nullptr && _getdiskfree(drive, &free) == 0) {
*tot = free.avail_clusters * free.sectors_per_cluster * free.bytes_per_sector;
return true;
}
@@ -119,7 +119,7 @@ bool FiosGetDiskFreeSpace(const char *path, uint64 *tot)
free = (uint64)s.f_frsize * s.f_bavail;
}
#endif
- if (tot != NULL) *tot = free;
+ if (tot != nullptr) *tot = free;
return true;
#endif
}
@@ -173,7 +173,7 @@ void ShowOSErrorBox(const char *buf, bool system)
int CDECL main(int argc, char *argv[])
{
- SetRandomSeed(time(NULL));
+ SetRandomSeed(time(nullptr));
/* Make sure our arguments contain only valid UTF-8 characters. */
for (int i = 0; i < argc; i++) ValidateString(argv[i]);
@@ -191,7 +191,7 @@ bool GetClipboardContents(char *buffer, const char *last)
{
const char *text = (const char*)WinQueryClipbrdData(hab, CF_TEXT);
- if (text != NULL)
+ if (text != nullptr)
{
strecpy(buffer, text, last);
WinCloseClipbrd(hab);