X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fstrings%2Fregmatch.h;h=0858e5a8dfc5cec44afba0d308ca45ef3c8d3206;hb=30ce69b5cb05712c3a4903b0f397912119c4f1f9;hp=325a9b229af08caf007ccbf64ae6a2dfa2ffd876;hpb=c7afef88380ebebc8c2b04e48664d73281ec8848;p=libs%2Fcore.git diff --git a/source/strings/regmatch.h b/source/strings/regmatch.h index 325a9b2..0858e5a 100644 --- a/source/strings/regmatch.h +++ b/source/strings/regmatch.h @@ -24,20 +24,19 @@ 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 = false; //< 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. */