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/path.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/path.cpp') diff --git a/src/path.cpp b/src/path.cpp index 8722c9a7..3f1bc6af 100644 --- a/src/path.cpp +++ b/src/path.cpp @@ -113,10 +113,10 @@ const std::vector > path::getChildComponents() void path::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) { - string::size_type pos = position; + size_t pos = position; while (pos < end && parserHelpers::isSpace(buffer[pos])) ++pos; @@ -131,12 +131,12 @@ void path::parseImpl while (pos < end && parserHelpers::isSpace(buffer[pos])) ++pos; - const string::size_type addrStart = pos; + const size_t addrStart = pos; while (pos < end && buffer[pos] != '>') ++pos; - string::size_type addrEnd = pos; + size_t addrEnd = pos; while (addrEnd > addrStart && parserHelpers::isSpace(buffer[addrEnd - 1])) addrEnd--; @@ -148,7 +148,7 @@ void path::parseImpl addrSpec = string(buffer.begin() + position, buffer.begin() + end); } - const string::size_type at = addrSpec.find_first_of('@'); + const size_t at = addrSpec.find_first_of('@'); if (at != string::npos) { @@ -168,7 +168,7 @@ void path::parseImpl void path::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 { if (m_localPart.empty() && m_domain.empty()) { -- cgit v1.2.3