From: Mikko Rasa Date: Sat, 13 Aug 2011 23:41:24 +0000 (+0300) Subject: Use string::size_type rather than unsigned to store string offsets X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=commitdiff_plain;h=928694ff233bd4383f30b05bf6d2d37562b77a9a;hp=427991f60b200fe4a6517e6fb1fe1980ab14983b Use string::size_type rather than unsigned to store string offsets --- diff --git a/source/strings/regmatch.h b/source/strings/regmatch.h index 325a9b2..c5116cd 100644 --- a/source/strings/regmatch.h +++ b/source/strings/regmatch.h @@ -24,11 +24,13 @@ public: */ struct Group { - bool match; //< Whether or not this group matched - unsigned begin; //< First offset of the match - unsigned end; //< One-past-last offset - unsigned length; //< Length of the match (end-begin) - std::string str; //< The part of the string that matched + typedef std::string::size_type size_type; + + bool match; //< Whether or not this group matched + size_type begin; //< First offset of the match + size_type end; //< One-past-last offset + size_type length; //< Length of the match (end-begin) + std::string str; //< The part of the string that matched Group(): match(false) { } operator bool() const { return match; }