diff options
author | attilamolnar <attilamolnar@hush.com> | 2012-07-24 14:54:29 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2012-10-12 03:57:39 +0200 |
commit | c8b41aa5d256d99eee67ec94492a94dc30e0ea35 (patch) | |
tree | 251cb805f1fe25423ca245b4a9b6d5db67451fe8 /src/commands | |
parent | 5961493368ec3c83b688afe6229d4efb1bb4d57a (diff) |
Remove superfluous std::string()s
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/cmd_die.cpp | 2 | ||||
-rw-r--r-- | src/commands/cmd_ison.cpp | 6 | ||||
-rw-r--r-- | src/commands/cmd_user.cpp | 2 | ||||
-rw-r--r-- | src/commands/cmd_userhost.cpp | 2 | ||||
-rw-r--r-- | src/commands/cmd_who.cpp | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/src/commands/cmd_die.cpp b/src/commands/cmd_die.cpp index a3cee5fad..9b0126e3e 100644 --- a/src/commands/cmd_die.cpp +++ b/src/commands/cmd_die.cpp @@ -49,7 +49,7 @@ CmdResult CommandDie::Handle (const std::vector<std::string>& parameters, User * if (!ServerInstance->PassCompare(user, ServerInstance->Config->diepass, parameters[0].c_str(), ServerInstance->Config->powerhash)) { { - std::string diebuf = std::string("*** DIE command from ") + user->nick + "!" + user->ident + "@" + user->dhost + ". Terminating."; + std::string diebuf = "*** DIE command from " + user->nick + "!" + user->ident + "@" + user->dhost + ". Terminating."; ServerInstance->Logs->Log("COMMAND",SPARSE, diebuf); ServerInstance->SendError(diebuf); } diff --git a/src/commands/cmd_ison.cpp b/src/commands/cmd_ison.cpp index 1a50239ee..227f1b3ed 100644 --- a/src/commands/cmd_ison.cpp +++ b/src/commands/cmd_ison.cpp @@ -48,7 +48,7 @@ CmdResult CommandIson::Handle (const std::vector<std::string>& parameters, User { std::map<User*,User*> ison_already; User *u; - std::string reply = std::string("303 ") + user->nick + " :"; + std::string reply = "303 " + user->nick + " :"; for (unsigned int i = 0; i < parameters.size(); i++) { @@ -62,7 +62,7 @@ CmdResult CommandIson::Handle (const std::vector<std::string>& parameters, User if (reply.length() > 450) { user->WriteServ(reply); - reply = std::string("303 ") + user->nick + " :"; + reply = "303 " + user->nick + " :"; } ison_already[u] = u; } @@ -87,7 +87,7 @@ CmdResult CommandIson::Handle (const std::vector<std::string>& parameters, User if (reply.length() > 450) { user->WriteServ(reply); - reply = std::string("303 ") + user->nick + " :"; + reply = "303 " + user->nick + " :"; } ison_already[u] = u; } diff --git a/src/commands/cmd_user.cpp b/src/commands/cmd_user.cpp index 57aecc2f7..305d0847f 100644 --- a/src/commands/cmd_user.cpp +++ b/src/commands/cmd_user.cpp @@ -62,7 +62,7 @@ CmdResult CommandUser::HandleLocal(const std::vector<std::string>& parameters, L * IDENTMAX here. */ user->ChangeIdent(parameters[0].c_str()); - user->fullname.assign(parameters[3].empty() ? std::string("No info") : parameters[3], 0, ServerInstance->Config->Limits.MaxGecos); + user->fullname.assign(parameters[3].empty() ? "No info" : parameters[3], 0, ServerInstance->Config->Limits.MaxGecos); user->registered = (user->registered | REG_USER); } } diff --git a/src/commands/cmd_userhost.cpp b/src/commands/cmd_userhost.cpp index af7d3ceca..399de0b1a 100644 --- a/src/commands/cmd_userhost.cpp +++ b/src/commands/cmd_userhost.cpp @@ -44,7 +44,7 @@ class CommandUserhost : public Command CmdResult CommandUserhost::Handle (const std::vector<std::string>& parameters, User *user) { - std::string retbuf = std::string("302 ") + user->nick + " :"; + std::string retbuf = "302 " + user->nick + " :"; for (unsigned int i = 0; i < parameters.size(); i++) { diff --git a/src/commands/cmd_who.cpp b/src/commands/cmd_who.cpp index c474abc3c..c8cb67694 100644 --- a/src/commands/cmd_who.cpp +++ b/src/commands/cmd_who.cpp @@ -251,7 +251,7 @@ CmdResult CommandWho::Handle (const std::vector<std::string>& parameters, User * Channel *ch = NULL; std::vector<std::string> whoresults; - std::string initial = "352 " + std::string(user->nick) + " "; + std::string initial = "352 " + user->nick + " "; char matchtext[MAXBUF]; bool usingwildcards = false; |