From fb53ece3408f8f6d43af5f30955903e4ed920039 Mon Sep 17 00:00:00 2001 From: Persson-dev Date: Wed, 6 Aug 2025 16:52:20 +0200 Subject: [PATCH] private SlotGuard --- include/server/IServerState.h | 2 +- include/td/misc/SlotGuard.h | 1 + include/td/render/Renderer.h | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/server/IServerState.h b/include/server/IServerState.h index 5f5f63d..6b9f9ad 100644 --- a/include/server/IServerState.h +++ b/include/server/IServerState.h @@ -8,7 +8,7 @@ namespace server { class Server; -class IServerState : public utils::SlotGuard { +class IServerState : private utils::SlotGuard { protected: void SendPacket(PlayerID a_Id, const protocol::PacketBase& a_Packet); void SetNewState(const std::shared_ptr& a_NewState); diff --git a/include/td/misc/SlotGuard.h b/include/td/misc/SlotGuard.h index 934b891..ba06a32 100644 --- a/include/td/misc/SlotGuard.h +++ b/include/td/misc/SlotGuard.h @@ -7,6 +7,7 @@ namespace utils { /** * \brief Wrapper class to automatically disconnect from a Signal on object destruction + * \note You should inherit this class privately * \sa Signal */ class SlotGuard { diff --git a/include/td/render/Renderer.h b/include/td/render/Renderer.h index e39475d..5ff36c6 100644 --- a/include/td/render/Renderer.h +++ b/include/td/render/Renderer.h @@ -18,7 +18,7 @@ class BasicRenderer { }; template -class Renderer : public BasicRenderer, public utils::SlotGuard { +class Renderer : public BasicRenderer, private utils::SlotGuard { protected: std::unique_ptr m_Shader; Camera& m_Camera;