diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-02-10 23:35:30 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-02-10 23:35:30 +0100 |
commit | 8712ce09e8f3a86dcf2f6c8ee7d030e3b41a4618 (patch) | |
tree | 3588c5990b6e5d6a0616442cb5bb4a4a76daff65 /src/party.cpp | |
parent | fadc53015b35b6b51313fb1c1debea82e85b8110 (diff) | |
download | mana-8712ce09e8f3a86dcf2f6c8ee7d030e3b41a4618.tar.gz mana-8712ce09e8f3a86dcf2f6c8ee7d030e3b41a4618.tar.bz2 mana-8712ce09e8f3a86dcf2f6c8ee7d030e3b41a4618.tar.xz mana-8712ce09e8f3a86dcf2f6c8ee7d030e3b41a4618.zip |
Use string::empty() instead of comparing to ""
Diffstat (limited to 'src/party.cpp')
-rw-r--r-- | src/party.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/party.cpp b/src/party.cpp index fe575a37..589aa9b1 100644 --- a/src/party.cpp +++ b/src/party.cpp @@ -67,7 +67,7 @@ void Party::respond(const std::string &command, const std::string &args) void Party::create(const std::string &party) { - if (party == "") + if (party.empty()) { mChat->chatLog(_("Party name is missing."), BY_SERVER); return; @@ -122,7 +122,7 @@ void Party::invitedAsk(const std::string &nick, int gender, const std::string &partyName) { mPartyName = partyName; /* Quick and nasty - needs redoing */ - if (nick == "") + if (nick.empty()) { mChat->chatLog(_("You can\'t have a blank party name!"), BY_SERVER); return; @@ -153,7 +153,7 @@ void Party::leftResponse(const std::string &nick) void Party::receiveChat(Being *being, const std::string &msg) { - if (being == NULL) + if (!being) { return; } @@ -169,7 +169,7 @@ void Party::receiveChat(Being *being, const std::string &msg) void Party::help(const std::string &msg) { - if (msg == "") + if (msg.empty()) { mChat->chatLog(_("Command: /party <command> <args>"), BY_SERVER); mChat->chatLog(_("where <command> can be one of:"), BY_SERVER); |