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:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user