X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fstrings%2Fregmatch.cpp;fp=source%2Fstrings%2Fregmatch.cpp;h=0e702b5e9568c5a3e5a2dd9a3fc6b49dce1d402a;hp=4799cfbd4e536b1634ba48b5d5bf625e8da06eb6;hb=f24e7b96e76b63c9b9b8a6bce4c7a9db64276ea8;hpb=9f754b788b872f9768af8c3a4f9e001a588e011a diff --git a/source/strings/regmatch.cpp b/source/strings/regmatch.cpp index 4799cfb..0e702b5 100644 --- a/source/strings/regmatch.cpp +++ b/source/strings/regmatch.cpp @@ -5,14 +5,14 @@ using namespace std; namespace Msp { -RegMatch::RegMatch(const string &str, const GroupArray &g): - groups(g) +RegMatch::RegMatch(const string &str, const vector &grps): + groups(grps) { - for(GroupArray::iterator i=groups.begin(); i!=groups.end(); ++i) - if(i->match) + for(Group &g: groups) + if(g.match) { - i->length = i->end-i->begin; - i->str = str.substr(i->begin, i->length); + g.length = g.end-g.begin; + g.str = str.substr(g.begin, g.length); } }