1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-21 00:19:29 +02:00

replace boost locks with std

This commit is contained in:
Laserlicht
2025-02-28 15:25:58 +01:00
parent 3fb9260f3b
commit 7dfb499edf
44 changed files with 148 additions and 147 deletions

View File

@ -215,7 +215,7 @@ void CServerHandler::connectToServer(const std::string & addr, const ui16 port)
void CServerHandler::onConnectionFailed(const std::string & errorMessage)
{
assert(getState() == EClientState::CONNECTING);
boost::mutex::scoped_lock interfaceLock(ENGINE->interfaceMutex);
std::scoped_lock interfaceLock(ENGINE->interfaceMutex);
if (isServerLocal())
{
@ -233,7 +233,7 @@ void CServerHandler::onConnectionFailed(const std::string & errorMessage)
void CServerHandler::onTimer()
{
boost::mutex::scoped_lock interfaceLock(ENGINE->interfaceMutex);
std::scoped_lock interfaceLock(ENGINE->interfaceMutex);
if(getState() == EClientState::CONNECTION_CANCELLED)
{
@ -253,7 +253,7 @@ void CServerHandler::onConnectionEstablished(const NetworkConnectionPtr & netCon
{
assert(getState() == EClientState::CONNECTING);
boost::mutex::scoped_lock interfaceLock(ENGINE->interfaceMutex);
std::scoped_lock interfaceLock(ENGINE->interfaceMutex);
networkConnection = netConnection;
@ -854,7 +854,7 @@ public:
void CServerHandler::onPacketReceived(const std::shared_ptr<INetworkConnection> &, const std::vector<std::byte> & message)
{
boost::mutex::scoped_lock interfaceLock(ENGINE->interfaceMutex);
std::scoped_lock interfaceLock(ENGINE->interfaceMutex);
if(getState() == EClientState::DISCONNECTING)
return;
@ -866,7 +866,7 @@ void CServerHandler::onPacketReceived(const std::shared_ptr<INetworkConnection>
void CServerHandler::onDisconnected(const std::shared_ptr<INetworkConnection> & connection, const std::string & errorMessage)
{
boost::mutex::scoped_lock interfaceLock(ENGINE->interfaceMutex);
std::scoped_lock interfaceLock(ENGINE->interfaceMutex);
if (connection != networkConnection)
{