summaryrefslogtreecommitdiff
path: root/src/party.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-02-10 23:35:30 +0100
committerIra Rice <irarice@gmail.com>2009-02-10 20:26:01 -0700
commitff1205d2b89f7f2273a32176c746f36836d7bfa9 (patch)
tree9174cd93bbc3445b027a04637f76b67948a85eab /src/party.cpp
parentd99b00a149e7828adb3c4651069483e51b0b458b (diff)
downloadmana-ff1205d2b89f7f2273a32176c746f36836d7bfa9.tar.gz
mana-ff1205d2b89f7f2273a32176c746f36836d7bfa9.tar.bz2
mana-ff1205d2b89f7f2273a32176c746f36836d7bfa9.tar.xz
mana-ff1205d2b89f7f2273a32176c746f36836d7bfa9.zip
Use string::empty() instead of comparing to ""
Diffstat (limited to 'src/party.cpp')
-rw-r--r--src/party.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/party.cpp b/src/party.cpp
index 75569bc5..a4f1b940 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);