diff options
author | Samuel Barney <samjbarney@gmail.com> | 2015-07-29 17:04:03 +0200 |
---|---|---|
committer | Samuel Barney <samjbarney@gmail.com> | 2015-07-29 17:49:30 +0200 |
commit | 804805d35a87c2acc9425d1762ad26b1ba2ec9ac (patch) | |
tree | 13b603c8bbf8177da92ce87f5413fb646d204f3f /src/Bindings/ManualBindings_World.cpp | |
parent | Merge pull request #2376 from mjhanninen/fix-freebsd-build (diff) | |
download | cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar.gz cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar.bz2 cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar.lz cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar.xz cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar.zst cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.zip |
Diffstat (limited to 'src/Bindings/ManualBindings_World.cpp')
-rw-r--r-- | src/Bindings/ManualBindings_World.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Bindings/ManualBindings_World.cpp b/src/Bindings/ManualBindings_World.cpp index d9590de33..59dde9a93 100644 --- a/src/Bindings/ManualBindings_World.cpp +++ b/src/Bindings/ManualBindings_World.cpp @@ -86,7 +86,7 @@ static int tolua_cWorld_ChunkStay(lua_State * tolua_S) } // Read the params: - cWorld * World = (cWorld *)tolua_tousertype(tolua_S, 1, nullptr); + cWorld * World = reinterpret_cast<cWorld *>(tolua_tousertype(tolua_S, 1, nullptr)); if (World == nullptr) { LOGWARNING("World:ChunkStay(): invalid world parameter"); @@ -356,7 +356,7 @@ static int tolua_cWorld_QueueTask(lua_State * tolua_S) } // Retrieve the args: - cWorld * self = (cWorld *)tolua_tousertype(tolua_S, 1, nullptr); + cWorld * self = reinterpret_cast<cWorld *>(tolua_tousertype(tolua_S, 1, nullptr)); if (self == nullptr) { return cManualBindings::lua_do_error(tolua_S, "Error in function call '#funcname#': Not called on an object instance"); @@ -473,7 +473,7 @@ static int tolua_cWorld_ScheduleTask(lua_State * tolua_S) { return 0; } - cWorld * World = (cWorld *)tolua_tousertype(tolua_S, 1, nullptr); + cWorld * World = reinterpret_cast<cWorld *>(tolua_tousertype(tolua_S, 1, nullptr)); if (World == nullptr) { return cManualBindings::lua_do_error(tolua_S, "Error in function call '#funcname#': Not called on an object instance"); @@ -486,7 +486,7 @@ static int tolua_cWorld_ScheduleTask(lua_State * tolua_S) return cManualBindings::lua_do_error(tolua_S, "Error in function call '#funcname#': Could not get function reference of parameter #1"); } - int DelayTicks = (int)tolua_tonumber(tolua_S, 2, 0); + int DelayTicks = static_cast<int>(tolua_tonumber(tolua_S, 2, 0)); auto task = std::make_shared<cLuaScheduledWorldTask>(*Plugin, FnRef); Plugin->AddResettable(task); |