diff options
author | attilamolnar <attilamolnar@hush.com> | 2012-11-28 02:37:49 +0100 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2012-11-28 19:28:52 +0100 |
commit | 2d2e0469b8ac7c64c9dc22f7074db8fc245e2f13 (patch) | |
tree | 6645e1002a23da05d3f651b1a341b75445c65992 /src/commands | |
parent | 790f8c35841ef7c9ec123242611613b540f14c2c (diff) |
Change empty string assignments to .clear() or remove them entirely
Part 2 of ba5c0db795824c3fc1ad48ce332d7bdc440cb77f
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/cmd_part.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
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<std::string>& 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)) |