From 7e265b05f440ed81b80f2de496c9d13221a69fe0 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Tue, 10 Dec 2013 08:52:51 +0100 Subject: Simplified types for better readability. Use appropriate types (size_t, byte_t...). Minor warning fixes. --- src/mediaType.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/mediaType.cpp') 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; -- cgit v1.2.3