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/command_parse.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/command_parse.cpp') diff --git a/src/command_parse.cpp b/src/command_parse.cpp index 2b75bfa9f..f05ffcd90 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -37,7 +37,7 @@ int InspIRCd::PassCompare(Extensible* ex, const std::string &data, const std::st return 1; /* We dont handle any hash types except for plaintext - Thanks tra26 */ - if (hashtype != "" && hashtype != "plaintext") + if (!hashtype.empty() && hashtype != "plaintext") /* See below. 1 because they dont match */ return 1; @@ -93,7 +93,7 @@ int CommandParser::LoopCall(User* user, Command* CommandObj, const std::vector new_parameters(parameters); if (!items2.GetToken(extrastuff)) - extrastuff = ""; + extrastuff.clear(); new_parameters[splithere] = item; if (extra >= 0) @@ -243,7 +243,7 @@ bool CommandParser::ProcessCommand(LocalUser *user, std::string &cmd) * a * test */ - std::string lparam = ""; + std::string lparam; /* * The '-1' here is a clever trick, we'll go backwards throwing everything into a temporary param -- cgit v1.2.3