Skip to content

Commit

Permalink
Use const Party_ptr& in player
Browse files Browse the repository at this point in the history
  • Loading branch information
ramon-bernardo committed Sep 1, 2024
1 parent 2b2c04c commit 36973f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4246,7 +4246,7 @@ void Player::sendPlayerPartyIcons(Player* player)
sendCreatureSkull(player);
}

bool Player::addPartyInvitation(Party_ptr party)
bool Player::addPartyInvitation(const Party_ptr& party)
{
auto it = std::find(invitePartyList.begin(), invitePartyList.end(), party);
if (it != invitePartyList.end()) {
Expand All @@ -4257,7 +4257,7 @@ bool Player::addPartyInvitation(Party_ptr party)
return true;
}

void Player::removePartyInvitation(Party_ptr party) { invitePartyList.remove(party); }
void Player::removePartyInvitation(const Party_ptr& party) { invitePartyList.remove(party); }

void Player::clearPartyInvitations()
{
Expand Down
4 changes: 2 additions & 2 deletions src/player.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ class Player final : public Creature, public Cylinder
bool isInviting(const Player* player) const;
bool isPartner(const Player* player) const;
void sendPlayerPartyIcons(Player* player);
bool addPartyInvitation(Party_ptr party);
void removePartyInvitation(Party_ptr party);
bool addPartyInvitation(const Party_ptr& party);
void removePartyInvitation(const Party_ptr& party);
void clearPartyInvitations();

GuildEmblems_t getGuildEmblem(const Player* player) const;
Expand Down

0 comments on commit 36973f3

Please sign in to comment.