summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-05 01:30:14 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-05 01:30:14 +0000
commit6ec362b129efcf2b65b30edae1e07f5333254bd8 (patch)
treed015525742e06f051f16ba280c7a21823b3e8be7
parent0d45af60471ee803c1a4543bccf3be5c20e6bb75 (diff)
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
-rw-r--r--src/command_parse.cpp4
1 files changed, 2 insertions, 2 deletions
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 <string>
#include <sstream>
#include <vector>
+#include <algorithm>
#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));