X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fstrings%2Fregmatch.h;h=b79104bad530f9f6846791e97cda7771f9252d37;hp=19cac11027dac128f6cdd537fe771d3a2316a2d9;hb=f24e7b96e76b63c9b9b8a6bce4c7a9db64276ea8;hpb=b56eb5ec1da675da0c66abc53c1e4f6c4e4cccbd diff --git a/source/strings/regmatch.h b/source/strings/regmatch.h index 19cac11..b79104b 100644 --- a/source/strings/regmatch.h +++ b/source/strings/regmatch.h @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of libmspstrings -Copyright © 2007 Mikko Rasa -Distributed under the LGPL -*/ - #ifndef MSP_STRINGS_REGMATCH_H_ #define MSP_STRINGS_REGMATCH_H_ @@ -31,20 +24,20 @@ 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; } }; - typedef std::vector GroupArray; - private: - GroupArray groups; + std::vector groups; public: /** Constructs a RegMatch representing a non-match. */