From 7f5b3919f471287a8de59bc13728f8059f645744 Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Mon, 31 Oct 2022 11:23:06 +0100 Subject: [PATCH] make destructors of virtual classes virtual this causes warnings in clang, and rightfully so :^) --- include/TLuaEngine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/TLuaEngine.h b/include/TLuaEngine.h index de19f13..21db6d2 100644 --- a/include/TLuaEngine.h +++ b/include/TLuaEngine.h @@ -76,7 +76,7 @@ public: }; TLuaEngine(); - ~TLuaEngine() noexcept { + virtual ~TLuaEngine() noexcept { beammp_debug("Lua Engine terminated"); } @@ -198,7 +198,7 @@ private: public: StateThreadData(const std::string& Name, TLuaStateId StateId, TLuaEngine& Engine); StateThreadData(const StateThreadData&) = delete; - ~StateThreadData() noexcept { beammp_debug("\"" + mStateId + "\" destroyed"); } + virtual ~StateThreadData() noexcept { beammp_debug("\"" + mStateId + "\" destroyed"); } [[nodiscard]] std::shared_ptr EnqueueScript(const TLuaChunk& Script); [[nodiscard]] std::shared_ptr EnqueueFunctionCall(const std::string& FunctionName, const std::vector& Args); [[nodiscard]] std::shared_ptr EnqueueFunctionCallFromCustomEvent(const std::string& FunctionName, const std::vector& Args, const std::string& EventName, CallStrategy Strategy);