From 6ec362b129efcf2b65b30edae1e07f5333254bd8 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 5 Aug 2006 01:30:14 +0000 Subject: Change a loop which uppercases the command to std::transform() git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4723 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/command_parse.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/command_parse.cpp') diff --git a/src/command_parse.cpp b/src/command_parse.cpp index 08c082383..922427c28 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include "users.h" #include "globals.h" #include "modules.h" @@ -207,8 +208,7 @@ void CommandParser::ProcessCommand(userrec *user, std::string &cmd) while (((para[items] = tokens.GetToken()) != "") && (items < 127)) command_p[items] = para[items++].c_str(); - for (std::string::iterator makeupper = command.begin(); makeupper != command.end(); makeupper++) - *makeupper = toupper(*makeupper); + std::transform(command.begin(), command.end(), command.begin(), ::toupper); int MOD_RESULT = 0; FOREACH_RESULT(I_OnPreCommand,OnPreCommand(command,command_p,items,user,false)); -- cgit v1.2.3