From 2d2e0469b8ac7c64c9dc22f7074db8fc245e2f13 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Wed, 28 Nov 2012 02:37:49 +0100 Subject: Change empty string assignments to .clear() or remove them entirely Part 2 of ba5c0db795824c3fc1ad48ce332d7bdc440cb77f --- src/commands/cmd_part.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/commands') diff --git a/src/commands/cmd_part.cpp b/src/commands/cmd_part.cpp index 32cc26757..aadb42d90 100644 --- a/src/commands/cmd_part.cpp +++ b/src/commands/cmd_part.cpp @@ -48,17 +48,13 @@ CmdResult CommandPart::Handle (const std::vector& parameters, User { if (!ServerInstance->Config->FixedPart.empty()) reason = ServerInstance->Config->FixedPart; - else - { - if (parameters.size() > 1) - reason = ServerInstance->Config->PrefixPart + parameters[1] + ServerInstance->Config->SuffixPart; - else - reason = ""; - } + else if (parameters.size() > 1) + reason = ServerInstance->Config->PrefixPart + parameters[1] + ServerInstance->Config->SuffixPart; } else { - reason = parameters.size() > 1 ? parameters[1] : ""; + if (parameters.size() > 1) + reason = parameters[1]; } if (ServerInstance->Parser->LoopCall(user, this, parameters, 0)) -- cgit v1.2.3