From d3d14d324442d05a8f135590c70237657ef1bab0 Mon Sep 17 00:00:00 2001 From: skyhusker Date: Sun, 23 Jan 2005 21:10:39 +0000 Subject: Removed some unnecesary castings, changed printf() to odebug --- diff --git a/noncore/net/opieirc/ircmessage.cpp b/noncore/net/opieirc/ircmessage.cpp index 41386ee..d19e9e6 100644 --- a/noncore/net/opieirc/ircmessage.cpp +++ b/noncore/net/opieirc/ircmessage.cpp @@ -1,3 +1,8 @@ +#include + +using namespace Opie::Core; + + #include #include #include @@ -69,20 +74,17 @@ IRCMessage::IRCMessage(QString line) { } - //-- Uncomment to debug -- - /* - printf("Parsed : '%s'\n", line.ascii()); - printf("Prefix : '%s'\n", m_prefix.ascii()); - printf("Command : '%s'\n", m_command.ascii()); - printf("Allparameters : '%s'\n", m_allParameters.ascii()); + odebug << "Parsed: " << line << oendl; + odebug << "Prefix: " << m_prefix << oendl; + odebug << "Command: " << m_command << oendl; + odebug << "Allparameters: " << m_allParameters << oendl; for (unsigned int i=0; i((*it).toInt()) < m_parameters.count()) - retvalue << m_parameters[(*it).toInt()]; + if((*it).toUInt() < m_parameters.count()) + retvalue << m_parameters[(*it).toUInt()]; } else { - int start, end; - start = (*it).left(pos).toInt(); - end = (*it).mid(pos+1).toInt(); - for (int i=start;i<=end && i < static_cast(m_parameters.count()) ;++i) { + unsigned int start, end; + start = (*it).left(pos).toUInt(); + end = (*it).mid(pos+1).toUInt(); + for (unsigned int i=start;i<=end && i < m_parameters.count() ;++i) { retvalue << m_parameters[i]; } } -- cgit v0.9.0.2