]> git.tdb.fi Git - libs/core.git/blobdiff - source/strings/regex.h
Mark overridden virtual functions as such
[libs/core.git] / source / strings / regex.h
index 67925023e544e76cd3f594addd0693d2b860d2c4..bef5231e4b8a3cc3e1337da11ad682c94b9653db 100644 (file)
@@ -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<RegMatch::Group> 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<RegMatch::Group> &) const;
        bool group_compare(const RegMatch::Group &, const RegMatch::Group &) const;
 
 public: