aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/smtp/SMTPChunkingOutputStreamAdapter.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/net/smtp/SMTPChunkingOutputStreamAdapter.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/net/smtp/SMTPChunkingOutputStreamAdapter.cpp')
-rw-r--r--src/net/smtp/SMTPChunkingOutputStreamAdapter.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/net/smtp/SMTPChunkingOutputStreamAdapter.cpp b/src/net/smtp/SMTPChunkingOutputStreamAdapter.cpp
index 0584f7e6..69f63bc9 100644
--- a/src/net/smtp/SMTPChunkingOutputStreamAdapter.cpp
+++ b/src/net/smtp/SMTPChunkingOutputStreamAdapter.cpp
@@ -47,7 +47,7 @@ SMTPChunkingOutputStreamAdapter::SMTPChunkingOutputStreamAdapter(shared_ptr <SMT
void SMTPChunkingOutputStreamAdapter::sendChunk
- (const value_type* const data, const size_type count, const bool last)
+ (const byte_t* const data, const size_t count, const bool last)
{
if (count == 0 && !last)
{
@@ -96,17 +96,17 @@ void SMTPChunkingOutputStreamAdapter::sendChunk
}
-void SMTPChunkingOutputStreamAdapter::write
- (const value_type* const data, const size_type count)
+void SMTPChunkingOutputStreamAdapter::writeImpl
+ (const byte_t* const data, const size_t count)
{
- const value_type* curData = data;
- size_type curCount = count;
+ const byte_t* curData = data;
+ size_t curCount = count;
while (curCount != 0)
{
// Fill the buffer
- const size_type remaining = sizeof(m_buffer) - m_bufferSize;
- const size_type bytesToCopy = std::min(remaining, curCount);
+ const size_t remaining = sizeof(m_buffer) - m_bufferSize;
+ const size_t bytesToCopy = std::min(remaining, curCount);
std::copy(data, data + bytesToCopy, m_buffer + m_bufferSize);
@@ -131,7 +131,7 @@ void SMTPChunkingOutputStreamAdapter::flush()
}
-utility::stream::size_type SMTPChunkingOutputStreamAdapter::getBlockSize()
+size_t SMTPChunkingOutputStreamAdapter::getBlockSize()
{
return sizeof(m_buffer);
}