Pylon: light cleanup of GetBannedList

Logic remains unchanged, just unscoped the iteration code by inverting the check for whether the array is empty.
This commit is contained in:
Kawe Mazidjatari 2024-11-11 00:14:25 +01:00
parent c1ca886ee5
commit 50b4c559c6

View File

@ -271,8 +271,9 @@ bool CPylon::GetBannedList(const CBanSystem::BannedList_t& inBannedVec, CBanSyst
const rapidjson::Value::ConstArray bannedPlayers = bannedPlayersIt->value.GetArray();
if (!bannedPlayers.Empty())
{
if (bannedPlayers.Empty())
return false;
*outBannedVec = new CBanSystem::BannedList_t();
Assert(*outBannedVec);
@ -289,11 +290,6 @@ bool CPylon::GetBannedList(const CBanSystem::BannedList_t& inBannedVec, CBanSyst
}
return true;
}
else
{
return false;
}
}
//-----------------------------------------------------------------------------