mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Use for-each loop instead of for-loop
This commit is contained in:
parent
6d8fad775d
commit
57d5c5a3d5
|
@ -618,11 +618,11 @@ CServerBrowser::CServerEntry *CServerBrowser::Add(const NETADDR *pAddrs, int Num
|
|||
|
||||
// check if it's an official server
|
||||
bool Official = false;
|
||||
for(int i = 0; !Official && i < (int)std::size(m_aNetworks); i++)
|
||||
for(const auto &Network : m_aNetworks)
|
||||
{
|
||||
for(int j = 0; !Official && j < m_aNetworks[i].m_NumCountries; j++)
|
||||
for(int j = 0; !Official && j < Network.m_NumCountries; j++)
|
||||
{
|
||||
CNetworkCountry *pCntr = &m_aNetworks[i].m_aCountries[j];
|
||||
const CNetworkCountry *pCntr = &Network.m_aCountries[j];
|
||||
for(int k = 0; !Official && k < pCntr->m_NumServers; k++)
|
||||
{
|
||||
for(int l = 0; !Official && l < NumAddrs; l++)
|
||||
|
@ -634,6 +634,8 @@ CServerBrowser::CServerEntry *CServerBrowser::Add(const NETADDR *pAddrs, int Num
|
|||
}
|
||||
}
|
||||
}
|
||||
if(Official)
|
||||
break;
|
||||
}
|
||||
pEntry->m_Info.m_Official = Official;
|
||||
|
||||
|
|
Loading…
Reference in a new issue