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/mediaType.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/mediaType.cpp')
-rw-r--r-- | src/mediaType.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mediaType.cpp b/src/mediaType.cpp index 2f9ca6b1..60486da7 100644 --- a/src/mediaType.cpp +++ b/src/mediaType.cpp @@ -49,15 +49,15 @@ mediaType::mediaType(const string& type, const string& subType) void mediaType::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; // Extract the type - const string::size_type typeStart = position; + const size_t typeStart = position; while (p < pend && *p != '/') ++p; @@ -85,7 +85,7 @@ void mediaType::parseImpl void mediaType::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 { const string value = m_type + "/" + m_subType; |