X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fstrings%2Fregmatch.h;h=b79104bad530f9f6846791e97cda7771f9252d37;hb=641a71730a0135fe647f6a230e9704d8b677f2c5;hp=325a9b229af08caf007ccbf64ae6a2dfa2ffd876;hpb=967785734be5c3fc6f75da122c2d93ebbb338271;p=libs%2Fcore.git diff --git a/source/strings/regmatch.h b/source/strings/regmatch.h index 325a9b2..b79104b 100644 --- a/source/strings/regmatch.h +++ b/source/strings/regmatch.h @@ -24,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. */