]> git.tdb.fi Git - libs/core.git/blobdiff - source/strings/regmatch.h
Mark constructors and destructors as default where appropriate
[libs/core.git] / source / strings / regmatch.h
index c5116cdc5408ec7238c65f6a250feb9bc23f8308..48f65c6df2b2409403762d0a28f067c8c297b07b 100644 (file)
@@ -26,24 +26,21 @@ public:
        {
                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
+               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<Group> GroupArray;
-
 private:
-       GroupArray groups;
+       std::vector<Group> groups;
 
 public:
        /** Constructs a RegMatch representing a non-match. */
-       RegMatch() { }
+       RegMatch() = default;
 
        /** Constructs a new RegMatch from a string and groups.  The length and str
        members of each group are computed and need not be set.  Intended to be used