diff --git a/source/lobby/XmppClient.cpp b/source/lobby/XmppClient.cpp index 9e0cd44173..1a5e6b4c92 100644 --- a/source/lobby/XmppClient.cpp +++ b/source/lobby/XmppClient.cpp @@ -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)