mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 10:52:46 +00:00
Use std::swap
This commit is contained in:
@ -760,7 +760,7 @@ void CliFileConn::Destroy () {
|
||||
|
||||
{
|
||||
hsLockForWriting lock(sockLock);
|
||||
SWAP(oldSock, sock);
|
||||
std::swap(oldSock, sock);
|
||||
}
|
||||
|
||||
if (oldSock)
|
||||
|
@ -218,7 +218,7 @@ static bool ConnEncrypt (ENetError error, void * param) {
|
||||
if (IS_NET_SUCCESS(error)) {
|
||||
s_critsect.Enter();
|
||||
{
|
||||
SWAP(s_active, conn);
|
||||
std::swap(s_active, conn);
|
||||
}
|
||||
s_critsect.Leave();
|
||||
}
|
||||
|
@ -267,7 +267,7 @@ static bool ConnEncrypt (ENetError error, void * param) {
|
||||
|
||||
s_critsect.Enter();
|
||||
{
|
||||
SWAP(s_active, conn);
|
||||
std::swap(s_active, conn);
|
||||
}
|
||||
s_critsect.Leave();
|
||||
|
||||
|
Reference in New Issue
Block a user