From 8712ce09e8f3a86dcf2f6c8ee7d030e3b41a4618 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Tue, 10 Feb 2009 23:35:30 +0100 Subject: Use string::empty() instead of comparing to "" --- src/party.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/party.cpp') 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 "), BY_SERVER); mChat->chatLog(_("where can be one of:"), BY_SERVER); -- cgit v1.2.3-70-g09d2