Use std::unique_ptr for the server turn manager

This commit is contained in:
phosit
2026-04-16 18:24:03 +02:00
parent 2b1b1dc1e3
commit 74255b49c0
2 changed files with 2 additions and 4 deletions
+1 -3
View File
@@ -177,8 +177,6 @@ CNetServerWorker::~CNetServerWorker()
if (m_Host)
enet_host_destroy(m_Host);
delete m_ServerTurnManager;
}
@@ -1555,7 +1553,7 @@ void CNetServerWorker::PreStartGame(const CStr& initAttribs)
return;
}
m_ServerTurnManager = new CNetServerTurnManager(*this);
m_ServerTurnManager = std::make_unique<CNetServerTurnManager>(*this);
for (CNetServerSession* session : m_Sessions)
{