diff options
author | Vincent Richard <[email protected]> | 2005-03-27 13:06:45 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2005-03-27 13:06:45 +0000 |
commit | 4ab9332ce6269807edb45e69f7e6000aa40d4478 (patch) | |
tree | 6f5e4e583ff7d7b88e62dac7b81a90c129a7d3b9 /src/addressList.cpp | |
parent | Some fixes for Visual C++/Windows. (diff) | |
download | vmime-4ab9332ce6269807edb45e69f7e6000aa40d4478.tar.gz vmime-4ab9332ce6269807edb45e69f7e6000aa40d4478.zip |
Added new basic type 'messageIdSequence'.
Diffstat (limited to 'src/addressList.cpp')
-rw-r--r-- | src/addressList.cpp | 25 |
1 files changed, 10 insertions, 15 deletions
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 <address*>::const_iterator i = m_list.begin(); - - for ( ; ; ) + for (std::vector <address*>::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; } |