From 6bd21074a3512c00e51df5289e099ac0fd11f01c Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Sun, 8 Jan 2006 10:57:46 +0000 Subject: Code clean-up. --- src/word.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/word.cpp') diff --git a/src/word.cpp b/src/word.cpp index ccb5d554..45dbc183 100644 --- a/src/word.cpp +++ b/src/word.cpp @@ -91,7 +91,7 @@ ref word::parseNext(const string& buffer, const string::size_type positio while (pos != end && parserHelpers::isSpace(buffer[pos])) ++pos; - unencoded += string(buffer.begin() + startPos, buffer.begin() + endPos); + unencoded += buffer.substr(startPos, endPos - startPos); unencoded += ' '; startPos = pos; @@ -101,7 +101,7 @@ ref word::parseNext(const string& buffer, const string::size_type positio buffer[pos] == '=' && buffer[pos + 1] == '?') { // Check whether there is some unencoded text before - unencoded += string(buffer.begin() + startPos, buffer.begin() + pos); + unencoded += buffer.substr(startPos, pos - startPos); if (!unencoded.empty()) { @@ -183,7 +183,7 @@ ref word::parseNext(const string& buffer, const string::size_type positio if (startPos != pos && !isFirst && prevIsEncoded) unencoded += ' '; - unencoded += string(buffer.begin() + startPos, buffer.begin() + end); + unencoded += buffer.substr(startPos, end - startPos); ref w = vmime::create (unencoded, charset(charsets::US_ASCII)); w->setParsedBounds(position, end); -- cgit v1.2.3