diff options
author | Mattes D <github@xoft.cz> | 2020-04-13 18:38:06 +0200 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2020-04-16 22:07:48 +0200 |
commit | 9ee47e59995f858ec531b3ee467f131594e4ba1f (patch) | |
tree | f005d8af4a0362d7eab8a96a71aca0d73275f8e1 /src/Bindings | |
parent | Prevent crash when breeding (diff) | |
download | cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.tar cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.tar.gz cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.tar.bz2 cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.tar.lz cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.tar.xz cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.tar.zst cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Bindings/LuaChunkStay.cpp | 2 | ||||
-rw-r--r-- | src/Bindings/LuaChunkStay.h | 6 | ||||
-rw-r--r-- | src/Bindings/LuaJson.cpp | 3 | ||||
-rw-r--r-- | src/Bindings/LuaState.h | 7 | ||||
-rw-r--r-- | src/Bindings/LuaWindow.h | 2 | ||||
-rw-r--r-- | src/Bindings/ManualBindings.h | 1 | ||||
-rw-r--r-- | src/Bindings/PluginLua.cpp | 2 | ||||
-rw-r--r-- | src/Bindings/PluginLua.h | 14 |
8 files changed, 18 insertions, 19 deletions
diff --git a/src/Bindings/LuaChunkStay.cpp b/src/Bindings/LuaChunkStay.cpp index d885470db..5881c124c 100644 --- a/src/Bindings/LuaChunkStay.cpp +++ b/src/Bindings/LuaChunkStay.cpp @@ -101,7 +101,7 @@ void cLuaChunkStay::Enable(cChunkMap & a_ChunkMap, cLuaState::cCallbackPtr a_OnC m_OnAllChunksAvailable = std::move(a_OnAllChunksAvailable); // Enable the ChunkStay: - super::Enable(a_ChunkMap); + Super::Enable(a_ChunkMap); } diff --git a/src/Bindings/LuaChunkStay.h b/src/Bindings/LuaChunkStay.h index 765a0b8b7..1f0c0a921 100644 --- a/src/Bindings/LuaChunkStay.h +++ b/src/Bindings/LuaChunkStay.h @@ -23,10 +23,10 @@ class cChunkMap; -class cLuaChunkStay - : public cChunkStay +class cLuaChunkStay: + public cChunkStay { - typedef cChunkStay super; + using Super = cChunkStay; public: cLuaChunkStay(); diff --git a/src/Bindings/LuaJson.cpp b/src/Bindings/LuaJson.cpp index 5b562eab5..ef042d44d 100644 --- a/src/Bindings/LuaJson.cpp +++ b/src/Bindings/LuaJson.cpp @@ -28,7 +28,8 @@ Keeps track of the error message and the problematic value's path in the table. class CannotSerializeException: public std::runtime_error { - typedef std::runtime_error Super; + using Super = std::runtime_error; + public: /** Constructs a new instance of the exception based on the provided values directly. */ explicit CannotSerializeException(const AString & a_ValueName, const char * a_ErrorMsg): diff --git a/src/Bindings/LuaState.h b/src/Bindings/LuaState.h index e2eacdaf4..bd75d8635 100644 --- a/src/Bindings/LuaState.h +++ b/src/Bindings/LuaState.h @@ -285,7 +285,7 @@ public: class cCallback: public cTrackedRef { - typedef cTrackedRef Super; + using Super = cTrackedRef; public: @@ -334,7 +334,7 @@ public: class cOptionalCallback: public cCallback { - typedef cCallback Super; + using Super = cCallback; public: @@ -369,7 +369,8 @@ public: class cTableRef: public cTrackedRef { - typedef cTrackedRef Super; + using Super = cTrackedRef; + public: cTableRef(void) {} diff --git a/src/Bindings/LuaWindow.h b/src/Bindings/LuaWindow.h index 6177b2cbe..eb919fe01 100644 --- a/src/Bindings/LuaWindow.h +++ b/src/Bindings/LuaWindow.h @@ -34,7 +34,7 @@ class cLuaWindow : // tolua_end , public cItemGrid::cListener { // tolua_export - typedef cWindow Super; + using Super = cWindow; public: /** Create a window of the specified type, with a slot grid of a_SlotsX * a_SlotsY size. diff --git a/src/Bindings/ManualBindings.h b/src/Bindings/ManualBindings.h index 42e34eda2..173f62649 100644 --- a/src/Bindings/ManualBindings.h +++ b/src/Bindings/ManualBindings.h @@ -16,6 +16,7 @@ // fwd: struct tolua_Error; +class cPluginLua; diff --git a/src/Bindings/PluginLua.cpp b/src/Bindings/PluginLua.cpp index 52695196b..fac07f00b 100644 --- a/src/Bindings/PluginLua.cpp +++ b/src/Bindings/PluginLua.cpp @@ -187,7 +187,7 @@ bool cPluginLua::Load(void) void cPluginLua::Unload(void) { ClearWebTabs(); - super::Unload(); + Super::Unload(); Close(); } diff --git a/src/Bindings/PluginLua.h b/src/Bindings/PluginLua.h index 99e2f22ef..a9e488074 100644 --- a/src/Bindings/PluginLua.h +++ b/src/Bindings/PluginLua.h @@ -19,15 +19,15 @@ - // tolua_begin -class cPluginLua : +class cPluginLua: public cPlugin { - typedef cPlugin super; + // tolua_end + + using Super = cPlugin; public: - // tolua_end /** A RAII-style mutex lock for accessing the internal LuaState. This will be the only way to retrieve the plugin's LuaState; @@ -206,8 +206,4 @@ protected: } return false; } -} ; // tolua_export - - - - +}; // tolua_export |