summaryrefslogtreecommitdiff
path: root/src/3rdparty/squirrel/sqstdlib
diff options
context:
space:
mode:
authorRubidium <rubidium@openttd.org>2021-06-16 21:15:40 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-06-17 16:18:30 +0200
commita9774f3e341812d43427b9e0166b0def08202477 (patch)
tree817319fa28a81cf204e93e7bef946ca8c67ba181 /src/3rdparty/squirrel/sqstdlib
parent3237e97b3592d4f3920dab556d551da65a465b8d (diff)
downloadopenttd-a9774f3e341812d43427b9e0166b0def08202477.tar.xz
Cleanup: [Squirrel] Use nullptr instead of 0 or NULL
Diffstat (limited to 'src/3rdparty/squirrel/sqstdlib')
-rw-r--r--src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp4
-rw-r--r--src/3rdparty/squirrel/sqstdlib/sqstdmath.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp b/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp
index a4f4e21c3..4eaa2cb3c 100644
--- a/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp
+++ b/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp
@@ -17,7 +17,7 @@ void sqstd_printcallstack(HSQUIRRELVM v)
SQFloat f;
const SQChar *s;
SQInteger level=1; //1 is to skip this function that is level 0
- const SQChar *name=0;
+ const SQChar *name=nullptr;
SQInteger seq=0;
pf(v,"\nCALLSTACK\n");
while(SQ_SUCCEEDED(sq_stackinfos(v,level,&si)))
@@ -116,7 +116,7 @@ static SQInteger _sqstd_aux_printerror(HSQUIRRELVM v)
{
SQPRINTFUNCTION pf = sq_getprintfunc(v);
if(pf) {
- const SQChar *sErr = 0;
+ const SQChar *sErr = nullptr;
if(sq_gettop(v)>=1) {
if(SQ_SUCCEEDED(sq_getstring(v,2,&sErr))) {
pf(v,"\nAN ERROR HAS OCCURRED [%s]\n",sErr);
diff --git a/src/3rdparty/squirrel/sqstdlib/sqstdmath.cpp b/src/3rdparty/squirrel/sqstdlib/sqstdmath.cpp
index 0ff009020..3ba6811a6 100644
--- a/src/3rdparty/squirrel/sqstdlib/sqstdmath.cpp
+++ b/src/3rdparty/squirrel/sqstdlib/sqstdmath.cpp
@@ -88,7 +88,7 @@ static SQRegFunction mathlib_funcs[] = {
#endif /* EXPORT_DEFAULT_SQUIRREL_FUNCTIONS */
_DECL_FUNC(fabs,2,".n"),
_DECL_FUNC(abs,2,".n"),
- {0,0,0,0},
+ {nullptr,nullptr,0,nullptr},
};
#ifndef M_PI
@@ -98,7 +98,7 @@ static SQRegFunction mathlib_funcs[] = {
SQRESULT sqstd_register_mathlib(HSQUIRRELVM v)
{
SQInteger i=0;
- while(mathlib_funcs[i].name!=0) {
+ while(mathlib_funcs[i].name!=nullptr) {
sq_pushstring(v,mathlib_funcs[i].name,-1);
sq_newclosure(v,mathlib_funcs[i].f,0);
sq_setparamscheck(v,mathlib_funcs[i].nparamscheck,mathlib_funcs[i].typemask);