mirror of
https://github.com/mangosfour/server.git
synced 2025-12-27 10:37:02 +00:00
[7313] Optimized checks of presence in std::set
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
7c2e850283
commit
8dbf8cda71
5 changed files with 15 additions and 10 deletions
|
|
@ -202,11 +202,8 @@ class Channel
|
|||
void SendToAllButOne(WorldPacket *data, uint64 who);
|
||||
void SendToOne(WorldPacket *data, uint64 who);
|
||||
|
||||
bool IsOn(uint64 who) const { return players.count(who) != 0; }
|
||||
|
||||
bool IsBanned(const uint64 guid) const {return banned.count(guid) != 0; }
|
||||
|
||||
bool IsFirst() const { return !(players.size() > 1); }
|
||||
bool IsOn(uint64 who) const { return players.find(who) != players.end(); }
|
||||
bool IsBanned(uint64 guid) const { return banned.find(guid) != banned.end(); }
|
||||
|
||||
uint8 GetPlayerFlags(uint64 p) const
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue