From 4ab9332ce6269807edb45e69f7e6000aa40d4478 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Sun, 27 Mar 2005 13:06:45 +0000 Subject: Added new basic type 'messageIdSequence'. --- src/addressList.cpp | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'src/addressList.cpp') diff --git a/src/addressList.cpp b/src/addressList.cpp index c6d9c9ad..9693a663 100644 --- a/src/addressList.cpp +++ b/src/addressList.cpp @@ -70,29 +70,24 @@ void addressList::parse(const string& buffer, const string::size_type position, void addressList::generate(utility::outputStream& os, const string::size_type maxLineLength, const string::size_type curLinePos, string::size_type* newLinePos) const { + string::size_type pos = curLinePos; + if (!m_list.empty()) { - string::size_type pos = curLinePos; - std::vector ::const_iterator i = m_list.begin(); - - for ( ; ; ) + for (std::vector ::const_iterator i = m_list.begin() ; ; ) { (*i)->generate(os, maxLineLength - 2, pos, &pos); - if (++i != m_list.end()) - { - os << ", "; - pos += 2; - } - else - { + if (++i == m_list.end()) break; - } - } - if (newLinePos) - *newLinePos = pos; + os << ", "; + pos += 2; + } } + + if (newLinePos) + *newLinePos = pos; } -- cgit v1.2.3