diff options
author | Erik Schilling <ablu.erikschilling@googlemail.com> | 2013-04-27 21:42:58 +0200 |
---|---|---|
committer | Erik Schilling <ablu.erikschilling@googlemail.com> | 2013-04-27 21:42:58 +0200 |
commit | d4f3105d9a879f27baad6e43b8b3cb6fe2f0ef50 (patch) | |
tree | 474ec7369f0d367d7780f73901d38d1daec4d2eb /src/scripting | |
parent | 2c14cd30ecbacbd5a808cb2641d40f6d568ec294 (diff) | |
download | manaserv-d4f3105d9a879f27baad6e43b8b3cb6fe2f0ef50.tar.gz manaserv-d4f3105d9a879f27baad6e43b8b3cb6fe2f0ef50.tar.bz2 manaserv-d4f3105d9a879f27baad6e43b8b3cb6fe2f0ef50.tar.xz manaserv-d4f3105d9a879f27baad6e43b8b3cb6fe2f0ef50.zip |
Use nullptr instead of NULL everywhere
Diffstat (limited to 'src/scripting')
-rw-r--r-- | src/scripting/lua.cpp | 20 | ||||
-rw-r--r-- | src/scripting/luascript.cpp | 2 | ||||
-rw-r--r-- | src/scripting/luautil.h | 2 | ||||
-rw-r--r-- | src/scripting/script.cpp | 4 |
4 files changed, 14 insertions, 14 deletions
diff --git a/src/scripting/lua.cpp b/src/scripting/lua.cpp index ac881787..422649f3 100644 --- a/src/scripting/lua.cpp +++ b/src/scripting/lua.cpp @@ -3691,11 +3691,11 @@ LuaScript::LuaScript(): { "map_get_objects", map_get_objects }, { "announce", announce }, { "get_special_info", get_special_info }, - { NULL, NULL } + { nullptr, nullptr } }; #if LUA_VERSION_NUM < 502 lua_pushvalue(mRootState, LUA_GLOBALSINDEX); - luaL_register(mRootState, NULL, callbacks); + luaL_register(mRootState, nullptr, callbacks); #else lua_pushglobaltable(mRootState); luaL_setfuncs(mRootState, callbacks, 0); @@ -3709,7 +3709,7 @@ LuaScript::LuaScript(): { "reusetime", attack_get_reusetime }, { "damage", attack_get_damage }, { "on_attack", attack_on_attack }, - { NULL, NULL } + { nullptr, nullptr } }; static luaL_Reg const members_Damage[] = { @@ -3722,7 +3722,7 @@ LuaScript::LuaScript(): { "type", damage_get_type }, { "is_truestrike", damage_is_truestrike }, { "range", damage_get_range }, - { NULL, NULL } + { nullptr, nullptr } }; static luaL_Reg const members_Entity[] = { @@ -3789,14 +3789,14 @@ LuaScript::LuaScript(): { "has_status", entity_has_status }, { "status_time", entity_get_status_time }, { "set_status_time", entity_set_status_time }, - { NULL, NULL } + { nullptr, nullptr } }; static luaL_Reg const members_ItemClass[] = { { "on", item_class_on }, { "name", item_class_get_name }, { "attacks", item_class_attacks }, - { NULL, NULL } + { nullptr, nullptr } }; static luaL_Reg const members_MapObject[] = { @@ -3804,7 +3804,7 @@ LuaScript::LuaScript(): { "bounds", map_object_get_bounds }, { "name", map_object_get_name }, { "type", map_object_get_type }, - { NULL, NULL } + { nullptr, nullptr } }; static luaL_Reg const members_MonsterClass[] = { @@ -3812,12 +3812,12 @@ LuaScript::LuaScript(): { "on_damage", monster_class_on_damage }, { "name", monster_class_get_name }, { "attacks", monster_class_attacks }, - { NULL, NULL } + { nullptr, nullptr } }; static luaL_Reg const members_StatusEffect[] = { { "on_tick", status_effect_on_tick }, - { NULL, NULL } + { nullptr, nullptr } }; static luaL_Reg const members_SpecialInfo[] = { @@ -3827,7 +3827,7 @@ LuaScript::LuaScript(): { "on_use", specialinfo_on_use }, { "on_recharged", specialinfo_on_recharged }, { "category", specialinfo_get_category }, - { NULL, NULL} + { nullptr, nullptr} }; LuaAttackInfo::registerType(mRootState, "Attack", members_AttackInfo); diff --git a/src/scripting/luascript.cpp b/src/scripting/luascript.cpp index f5fb6a4e..2b9644da 100644 --- a/src/scripting/luascript.cpp +++ b/src/scripting/luascript.cpp @@ -155,7 +155,7 @@ bool LuaScript::resume() #if LUA_VERSION_NUM < 502 int result = lua_resume(mCurrentState, tmpNbArgs); #else - int result = lua_resume(mCurrentState, NULL, tmpNbArgs); + int result = lua_resume(mCurrentState, nullptr, tmpNbArgs); #endif if (result == 0) // Thread is done diff --git a/src/scripting/luautil.h b/src/scripting/luautil.h index 6d078e3e..8bcc2a30 100644 --- a/src/scripting/luautil.h +++ b/src/scripting/luautil.h @@ -102,7 +102,7 @@ public: lua_pushliteral(s, "__index"); // metatable, "__index" lua_createtable(s, 0, 0); // metatable, "__index", {} #if LUA_VERSION_NUM < 502 - luaL_register(s, NULL, members); + luaL_register(s, nullptr, members); #else luaL_setfuncs(s, members, 0); #endif diff --git a/src/scripting/script.cpp b/src/scripting/script.cpp index 72943d43..715a7991 100644 --- a/src/scripting/script.cpp +++ b/src/scripting/script.cpp @@ -33,7 +33,7 @@ typedef std::map< std::string, Script::Factory > Engines; -static Engines *engines = NULL; +static Engines *engines = nullptr; Script::Ref Script::mCreateNpcDelayedCallback; Script::Ref Script::mUpdateCallback; @@ -73,7 +73,7 @@ Script *Script::create(const std::string &engine) } } LOG_ERROR("No scripting engine named " << engine); - return NULL; + return nullptr; } void Script::update() |