diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/minimap.cpp | 2 | ||||
-rw-r--r-- | src/gui/partywindow.cpp | 10 | ||||
-rw-r--r-- | src/gui/partywindow.h | 2 |
3 files changed, 6 insertions, 8 deletions
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp index 160c0722..a5bdc59d 100644 --- a/src/gui/minimap.cpp +++ b/src/gui/minimap.cpp @@ -181,7 +181,7 @@ void Minimap::draw(gcn::Graphics *graphics) { case Being::PLAYER: { - const Player* player = static_cast<const Player*>(being); + const Player *player = static_cast<const Player*>(being); Palette::ColorType type = Palette::PC; diff --git a/src/gui/partywindow.cpp b/src/gui/partywindow.cpp index 52a7b97e..317811ee 100644 --- a/src/gui/partywindow.cpp +++ b/src/gui/partywindow.cpp @@ -65,7 +65,7 @@ PartyWindow::~PartyWindow() delete_all(mMembers); } -void PartyWindow::setPartyName(std::string name) +void PartyWindow::setPartyName(const std::string &name) { setCaption(strprintf(_("Party (%s)"), name.c_str())); } @@ -125,8 +125,7 @@ void PartyWindow::updateMember(int id, const std::string &memberName, member->avatar->setName(memberName); member->avatar->setOnline(online); - Player *player = dynamic_cast<Player*>(beingManager->findBeing(id)); - if (player) + if (Player *player = dynamic_cast<Player*>(beingManager->findBeing(id))) player->setInParty(true); } @@ -141,8 +140,7 @@ void PartyWindow::removeMember(int id) { mMembers.erase(id); - Player *player = dynamic_cast<Player*>(beingManager->findBeing(id)); - if (player) + if (Player *player = dynamic_cast<Player*>(beingManager->findBeing(id))) player->setInParty(false); } @@ -210,7 +208,7 @@ void PartyWindow::action(const gcn::ActionEvent &event) } } -void clearMembersSub(std::pair<int, PartyMember*> p) +void clearMembersSub(const std::pair<int, PartyMember*> &p) { Player *player = dynamic_cast<Player*>(beingManager->findBeing(p.first)); if (player) diff --git a/src/gui/partywindow.h b/src/gui/partywindow.h index c3fe75f4..8cea500f 100644 --- a/src/gui/partywindow.h +++ b/src/gui/partywindow.h @@ -65,7 +65,7 @@ class PartyWindow : public Window, gcn::ActionListener */ ~PartyWindow(); - void setPartyName(std::string name); + void setPartyName(const std::string &name); void clearPartyName(); |