aboutsummaryrefslogtreecommitdiffstats
path: root/src/bodyPart.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2013-12-10 07:52:51 +0000
committerVincent Richard <[email protected]>2013-12-10 07:52:51 +0000
commit7e265b05f440ed81b80f2de496c9d13221a69fe0 (patch)
treed4dad210715ea9d60b2136bd416647d4bc02166a /src/bodyPart.cpp
parentEnforce strict aliasing rule and avoid alignment issues. (diff)
downloadvmime-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/bodyPart.cpp')
-rw-r--r--src/bodyPart.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/bodyPart.cpp b/src/bodyPart.cpp
index be5b8e3a..12896f84 100644
--- a/src/bodyPart.cpp
+++ b/src/bodyPart.cpp
@@ -38,14 +38,11 @@ bodyPart::bodyPart()
void bodyPart::parseImpl
- (const parsingContext& ctx,
- shared_ptr <utility::parserInputStreamAdapter> parser,
- const utility::stream::size_type position,
- const utility::stream::size_type end,
- utility::stream::size_type* newPosition)
+ (const parsingContext& ctx, shared_ptr <utility::parserInputStreamAdapter> parser,
+ const size_t position, const size_t end, size_t* newPosition)
{
// Parse the headers
- string::size_type pos = position;
+ size_t pos = position;
m_header->parse(ctx, parser, pos, end, &pos);
// Parse the body contents
@@ -60,7 +57,7 @@ void bodyPart::parseImpl
void bodyPart::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
{
m_header->generate(ctx, os);
@@ -73,7 +70,7 @@ void bodyPart::generateImpl
}
-utility::stream::size_type bodyPart::getGeneratedSize(const generationContext& ctx)
+size_t bodyPart::getGeneratedSize(const generationContext& ctx)
{
return m_header->getGeneratedSize(ctx) + 2 /* CRLF */ + m_body->getGeneratedSize(ctx);
}