From ec44d7c04efc334c3c225ce7ae4e145cb392223f Mon Sep 17 00:00:00 2001 From: om Date: Wed, 8 Mar 2006 01:04:03 +0000 Subject: 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 --- src/mode.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') 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()); } -- cgit v1.2.3