summaryrefslogtreecommitdiff
path: root/src/script/squirrel_helper.hpp
diff options
context:
space:
mode:
authorRubidium <rubidium@openttd.org>2021-06-16 21:10:41 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-06-17 16:18:30 +0200
commit3237e97b3592d4f3920dab556d551da65a465b8d (patch)
tree2080483e02f2af2241881d83d0bab8f21be61f91 /src/script/squirrel_helper.hpp
parent930bb224168145f942a426dc8404f02f20fa2be0 (diff)
downloadopenttd-3237e97b3592d4f3920dab556d551da65a465b8d.tar.xz
Cleanup: [Script] Use nullptr instead of 0 or NULL
Diffstat (limited to 'src/script/squirrel_helper.hpp')
-rw-r--r--src/script/squirrel_helper.hpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/script/squirrel_helper.hpp b/src/script/squirrel_helper.hpp
index ff25a5d58..6a3ba6125 100644
--- a/src/script/squirrel_helper.hpp
+++ b/src/script/squirrel_helper.hpp
@@ -754,9 +754,9 @@ namespace SQConvert {
sq_pop(vm, 3);
/* Get the 'real' instance of this class */
- sq_getinstanceup(vm, 1, &real_instance, 0);
+ sq_getinstanceup(vm, 1, &real_instance, nullptr);
/* Get the real function pointer */
- sq_getuserdata(vm, nparam, &ptr, 0);
+ sq_getuserdata(vm, nparam, &ptr, nullptr);
if (real_instance == nullptr) return sq_throwerror(vm, "couldn't detect real instance of class for non-static call");
/* Remove the userdata from the stack */
sq_pop(vm, 1);
@@ -796,9 +796,9 @@ namespace SQConvert {
sq_pop(vm, 3);
/* Get the 'real' instance of this class */
- sq_getinstanceup(vm, 1, &real_instance, 0);
+ sq_getinstanceup(vm, 1, &real_instance, nullptr);
/* Get the real function pointer */
- sq_getuserdata(vm, nparam, &ptr, 0);
+ sq_getuserdata(vm, nparam, &ptr, nullptr);
if (real_instance == nullptr) return sq_throwerror(vm, "couldn't detect real instance of class for non-static call");
/* Remove the userdata from the stack */
sq_pop(vm, 1);
@@ -820,7 +820,7 @@ namespace SQConvert {
SQUserPointer ptr = nullptr;
/* Get the real function pointer */
- sq_getuserdata(vm, nparam, &ptr, 0);
+ sq_getuserdata(vm, nparam, &ptr, nullptr);
try {
/* Delegate it to a template that can handle this specific function */
@@ -844,7 +844,7 @@ namespace SQConvert {
SQUserPointer ptr = nullptr;
/* Get the real function pointer */
- sq_getuserdata(vm, nparam, &ptr, 0);
+ sq_getuserdata(vm, nparam, &ptr, nullptr);
/* Remove the userdata from the stack */
sq_pop(vm, 1);