diff options
| author | 2006-03-08 01:04:03 +0000 | |
|---|---|---|
| committer | 2006-03-08 01:04:03 +0000 | |
| commit | ec44d7c04efc334c3c225ce7ae4e145cb392223f (patch) | |
| tree | b4b8d7299bf1e26e99080661a1114c55e4fbbcf4 /src/mode.cpp | |
| parent | Speed up and deuglify the second part of CompressModes(), stop it searching f... (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
Diffstat (limited to 'src/mode.cpp')
| -rw-r--r-- | src/mode.cpp | 7 |
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()); } |
