summaryrefslogtreecommitdiff
path: root/src/game/game_info.cpp
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/game/game_info.cpp
parent3b4f224c0bc50e7248050d4bcbb6d83fd510c1cc (diff)
downloadopenttd-7c8e7c6b6e16d4a26259a676db32d8776b99817e.tar.xz
Codechange: Use null pointer literal instead of the NULL macro
Diffstat (limited to 'src/game/game_info.cpp')
-rw-r--r--src/game/game_info.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game/game_info.cpp b/src/game/game_info.cpp
index 0aa316174..d815e6fd2 100644
--- a/src/game/game_info.cpp
+++ b/src/game/game_info.cpp
@@ -55,8 +55,8 @@ template <> const char *GetClassName<GameInfo, ST_GS>() { return "GSInfo"; }
/* static */ SQInteger GameInfo::Constructor(HSQUIRRELVM vm)
{
/* Get the GameInfo */
- SQUserPointer instance = NULL;
- if (SQ_FAILED(sq_getinstanceup(vm, 2, &instance, 0)) || instance == NULL) return sq_throwerror(vm, "Pass an instance of a child class of GameInfo to RegisterGame");
+ SQUserPointer instance = nullptr;
+ if (SQ_FAILED(sq_getinstanceup(vm, 2, &instance, 0)) || instance == nullptr) return sq_throwerror(vm, "Pass an instance of a child class of GameInfo to RegisterGame");
GameInfo *info = (GameInfo *)instance;
SQInteger res = ScriptInfo::Constructor(vm, info);
@@ -82,7 +82,7 @@ template <> const char *GetClassName<GameInfo, ST_GS>() { return "GSInfo"; }
}
/* Remove the link to the real instance, else it might get deleted by RegisterGame() */
- sq_setinstanceup(vm, 2, NULL);
+ sq_setinstanceup(vm, 2, nullptr);
/* Register the Game to the base system */
info->GetScanner()->RegisterScript(info);
return 0;
@@ -91,7 +91,7 @@ template <> const char *GetClassName<GameInfo, ST_GS>() { return "GSInfo"; }
GameInfo::GameInfo() :
min_loadable_version(0),
is_developer_only(false),
- api_version(NULL)
+ api_version(nullptr)
{
}