From 3f4226eaac5d0d30be1f4ca5d5cf010c98a7ce7d Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Sun, 12 Oct 2008 10:05:28 +0000 Subject: Fixed compilation warnings. --- src/mailbox.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/mailbox.cpp') diff --git a/src/mailbox.cpp b/src/mailbox.cpp index dfe55e09..b1ed7a28 100644 --- a/src/mailbox.cpp +++ b/src/mailbox.cpp @@ -165,7 +165,10 @@ void mailbox::parse(const string& buffer, const string::size_type position, { // Erase any space between display name and
string::iterator q = name.end(); - for ( ; q != name.begin() && parserHelpers::isSpace(*(q - 1)) ; --q); + + while (q != name.begin() && parserHelpers::isSpace(*(q - 1))) + --q; + name.erase(q, name.end()); break; @@ -431,13 +434,13 @@ void mailbox::generate(utility::outputStream& os, const string::size_type maxLin } -const bool mailbox::operator==(const class mailbox& mailbox) const +bool mailbox::operator==(const class mailbox& mailbox) const { return (m_name == mailbox.m_name && m_email == mailbox.m_email); } -const bool mailbox::operator!=(const class mailbox& mailbox) const +bool mailbox::operator!=(const class mailbox& mailbox) const { return !(*this == mailbox); } @@ -465,7 +468,7 @@ ref mailbox::clone() const } -const bool mailbox::isEmpty() const +bool mailbox::isEmpty() const { return (m_email.empty()); } @@ -478,7 +481,7 @@ void mailbox::clear() } -const bool mailbox::isGroup() const +bool mailbox::isGroup() const { return (false); } -- cgit v1.2.3