diff options
author | Vincent Richard <[email protected]> | 2013-12-10 07:52:51 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2013-12-10 07:52:51 +0000 |
commit | 7e265b05f440ed81b80f2de496c9d13221a69fe0 (patch) | |
tree | d4dad210715ea9d60b2136bd416647d4bc02166a /src/mailbox.cpp | |
parent | Enforce strict aliasing rule and avoid alignment issues. (diff) | |
download | vmime-7e265b05f440ed81b80f2de496c9d13221a69fe0.tar.gz vmime-7e265b05f440ed81b80f2de496c9d13221a69fe0.zip |
Simplified types for better readability. Use appropriate types (size_t, byte_t...). Minor warning fixes.
Diffstat (limited to 'src/mailbox.cpp')
-rw-r--r-- | src/mailbox.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mailbox.cpp b/src/mailbox.cpp index a38aada0..7c6d5e3b 100644 --- a/src/mailbox.cpp +++ b/src/mailbox.cpp @@ -67,12 +67,12 @@ angle-addr = [CFWS] "<" addr-spec ">" [CFWS] / obs-angle-addr */ void mailbox::parseImpl - (const parsingContext& ctx, const string& buffer, const string::size_type position, - const string::size_type end, string::size_type* newPosition) + (const parsingContext& ctx, const string& buffer, const size_t position, + const size_t end, size_t* newPosition) { - const string::value_type* const pend = buffer.data() + end; - const string::value_type* const pstart = buffer.data() + position; - const string::value_type* p = pstart; + const char* const pend = buffer.data() + end; + const char* const pstart = buffer.data() + position; + const char* p = pstart; // Ignore blank spaces at the beginning while (p < pend && parserHelpers::isSpace(*p)) ++p; @@ -333,7 +333,7 @@ void mailbox::parseImpl void mailbox::generateImpl (const generationContext& ctx, utility::outputStream& os, - const string::size_type curLinePos, string::size_type* newLinePos) const + const size_t curLinePos, size_t* newLinePos) const { string generatedEmail; utility::outputStreamStringAdapter generatedEmailStream(generatedEmail); @@ -341,7 +341,7 @@ void mailbox::generateImpl if (m_name.isEmpty()) { - string::size_type pos = curLinePos; + size_t pos = curLinePos; // No display name is specified, only email address. if (curLinePos + generatedEmail.length() > ctx.getMaxLineLength()) @@ -404,7 +404,7 @@ void mailbox::generateImpl } } - string::size_type pos = curLinePos; + size_t pos = curLinePos; m_name.encodeAndFold(ctx, os, pos, &pos, text::QUOTE_IF_POSSIBLE | (forceEncode ? text::FORCE_ENCODING : 0)); |