summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-12-27 13:34:52 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-12-27 13:34:52 +0000
commitdcf958f42b6eeb7b22a99de561d3612791b62c80 (patch)
treed1c317412e86017ef77de42242d6fce7e4427cbe
parentc2ea19643b7bbd3df3ace89bf1b9a3815bda293a (diff)
Use std::set instead of std::map needlessly.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10919 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/command_parse.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index f427b478c..6a3d48cc2 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -72,7 +72,7 @@ int CommandParser::LoopCall(User* user, Command* CommandObj, const std::vector<s
* By using std::map (thanks for the idea w00t) we can cut this down a ton.
* ...VOOODOOOO!
*/
- std::map<irc::string, bool> dupes;
+ std::set<irc::string> dupes;
/* Create two lists, one for channel names, one for keys
*/
@@ -103,7 +103,7 @@ int CommandParser::LoopCall(User* user, Command* CommandObj, const std::vector<s
CommandObj->Handle(new_parameters, user);
- dupes[item.c_str()] = true;
+ dupes.insert(item.c_str());
}
}
return 1;
@@ -120,7 +120,7 @@ int CommandParser::LoopCall(User* user, Command* CommandObj, const std::vector<s
if (parameters[splithere].find(',') == std::string::npos)
return 0;
- std::map<irc::string, bool> dupes;
+ std::set<irc::string> dupes;
/* Only one commasepstream here */
irc::commasepstream items1(parameters[splithere]);
@@ -145,7 +145,7 @@ int CommandParser::LoopCall(User* user, Command* CommandObj, const std::vector<s
/* Execute the command handler. */
CommandObj->Handle(new_parameters, user);
- dupes[item.c_str()] = true;
+ dupes.insert(item.c_str());
}
}
/* By returning 1 we tell our caller that nothing is to be done,