X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fstrings%2Fregex.h;h=bef5231e4b8a3cc3e1337da11ad682c94b9653db;hp=67925023e544e76cd3f594addd0693d2b860d2c4;hb=991fabc1956b73a4007859058fb44171000b452e;hpb=d16185720fa344263367dbd50c61bfc8183d99a4 diff --git a/source/strings/regex.h b/source/strings/regex.h index 6792502..bef5231 100644 --- a/source/strings/regex.h +++ b/source/strings/regex.h @@ -11,7 +11,7 @@ class bad_regex: public std::logic_error { public: bad_regex(const std::string &, const std::string &, const std::string::const_iterator &); - virtual ~bad_regex() throw() { } + ~bad_regex() throw() override = default; private: std::string make_where(const std::string &, const std::string::const_iterator &); @@ -103,11 +103,11 @@ private: struct RunContext { Code::const_iterator citer; - RegMatch::GroupArray groups; + std::vector groups; }; Code code; - unsigned n_groups; + unsigned n_groups = 0; public: /** Constructs a new Regex object from a string representation. */ @@ -128,7 +128,7 @@ public: RegMatch match(const std::string &str) const; private: - bool run(const std::string &, const std::string::const_iterator &, RegMatch::GroupArray &) const; + bool run(const std::string &, const std::string::const_iterator &, std::vector &) const; bool group_compare(const RegMatch::Group &, const RegMatch::Group &) const; public: