summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-08 01:04:03 +0000
committerom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-08 01:04:03 +0000
commitec44d7c04efc334c3c225ce7ae4e145cb392223f (patch)
treeb4b8d7299bf1e26e99080661a1114c55e4fbbcf4
parentb8734f923fe9a859cf29db83db99444787bd1a08 (diff)
Avoid some ugly casts and save (well..system dependant..) about...3 bytes of ram! :P
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3539 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/mode.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index eb3deb228..724a54693 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -426,15 +426,16 @@ std::string ModeParser::CompressModes(std::string modes,bool channelmodes)
active[(unsigned int)modes[i]] = true;
}
}
- for (int j = 65; j < 127; j++)
+
+ for(unsigned char j = 65; j < 127; j++)
{
if ((counts[j] > 1) && (active[j] == true))
{
std::string::size_type pos;
- while((pos = modes.find((unsigned char)j)) != std::string::npos)
+ while((pos = modes.find(j)) != std::string::npos)
{
- log(DEBUG, "Deleting occurence of mode %c...", (unsigned char)j);
+ log(DEBUG, "Deleting occurence of mode %c...", j);
modes.erase(pos, 1);
log(DEBUG,"New mode line: %s", modes.c_str());
}