From cf513d2e3f0d6645d9b7aba5fa5e74499297e9a5 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 10 May 2008 21:15:56 +0000 Subject: Improve this not to use pointer maths directly, use an iterator git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9699 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/commands/cmd_who.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/commands/cmd_who.cpp b/src/commands/cmd_who.cpp index 5608f3557..2c91cb6e7 100644 --- a/src/commands/cmd_who.cpp +++ b/src/commands/cmd_who.cpp @@ -212,15 +212,12 @@ CmdResult CommandWho::Handle (const std::vector& parameters, User * if (ServerInstance->FindServerName(matchtext)) usingwildcards = true; - if (parameters.count() > 1) + if (parameters.size() > 1) { - /* parse flags */ - const char *iter = parameters[1].c_str(); - /* Fix for bug #444, WHO flags count as a wildcard */ usingwildcards = true; - while (*iter) + for (std::string::const_iterator iter = parameters[1].begin(); iter != parameters[1].end(); ++iter) { switch (*iter) { @@ -260,8 +257,6 @@ CmdResult CommandWho::Handle (const std::vector& parameters, User * opt_far = true; break; } - - *iter++; } } -- cgit v1.2.3