aboutsummaryrefslogtreecommitdiffstats
path: root/src/addressList.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2005-03-27 13:06:45 +0000
committerVincent Richard <[email protected]>2005-03-27 13:06:45 +0000
commit4ab9332ce6269807edb45e69f7e6000aa40d4478 (patch)
tree6f5e4e583ff7d7b88e62dac7b81a90c129a7d3b9 /src/addressList.cpp
parentSome fixes for Visual C++/Windows. (diff)
downloadvmime-4ab9332ce6269807edb45e69f7e6000aa40d4478.tar.gz
vmime-4ab9332ce6269807edb45e69f7e6000aa40d4478.zip
Added new basic type 'messageIdSequence'.
Diffstat (limited to 'src/addressList.cpp')
-rw-r--r--src/addressList.cpp25
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;
}