1
0
forked from mirrors/0ad

Simplify exchange in XMPPClient

Prime usecase for std::excahnge.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
Ralph Sennhauser
2026-01-03 20:29:59 +01:00
parent dcd12183e4
commit e92972d51c
+1 -3
View File
@@ -713,9 +713,7 @@ bool XmppClient::GuiPollHasPlayerListUpdate()
if (!m_initialLoadComplete)
return false;
bool hasUpdate = m_PlayerMapUpdate;
m_PlayerMapUpdate = false;
return hasUpdate;
return std::exchange(m_PlayerMapUpdate, false);
}
JS::Value XmppClient::GuiPollNewMessages(const ScriptInterface& guiInterface)