private SlotGuard

This commit is contained in:
2025-08-06 16:52:20 +02:00
parent 5d196c4b61
commit fb53ece340
3 changed files with 3 additions and 2 deletions

View File

@@ -8,7 +8,7 @@ namespace server {
class Server; class Server;
class IServerState : public utils::SlotGuard { class IServerState : private utils::SlotGuard {
protected: protected:
void SendPacket(PlayerID a_Id, const protocol::PacketBase& a_Packet); void SendPacket(PlayerID a_Id, const protocol::PacketBase& a_Packet);
void SetNewState(const std::shared_ptr<IServerState>& a_NewState); void SetNewState(const std::shared_ptr<IServerState>& a_NewState);

View File

@@ -7,6 +7,7 @@ namespace utils {
/** /**
* \brief Wrapper class to automatically disconnect from a Signal on object destruction * \brief Wrapper class to automatically disconnect from a Signal on object destruction
* \note You should inherit this class privately
* \sa Signal * \sa Signal
*/ */
class SlotGuard { class SlotGuard {

View File

@@ -18,7 +18,7 @@ class BasicRenderer {
}; };
template <typename TShader> template <typename TShader>
class Renderer : public BasicRenderer, public utils::SlotGuard { class Renderer : public BasicRenderer, private utils::SlotGuard {
protected: protected:
std::unique_ptr<TShader> m_Shader; std::unique_ptr<TShader> m_Shader;
Camera& m_Camera; Camera& m_Camera;