]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/collection.h
Use default member initializers for constant initial values
[libs/datafile.git] / source / collection.h
index 4a2f736de49cdabc4df1c9da4ce4ee96cda4753e..98a08b6757a2c3eeed121c4c262e79248d57af02 100644 (file)
@@ -89,10 +89,9 @@ private:
        std::vector<CollectionItemTypeBase *> types;
        ItemMap items;
        std::vector<const CollectionSource *> sources;
-       Collection *fallback;
+       Collection *fallback = nullptr;
 
 public:
-       Collection();
        virtual ~Collection();
 
        /** Adds an object into the collection.  The name must not pre-exist.  The
@@ -335,7 +334,7 @@ class CollectionItemTypeBase
 protected:
        struct ExtractorBase
        {
-               virtual ~ExtractorBase() { }
+               virtual ~ExtractorBase() = default;
        };
 
        template<typename T>
@@ -348,7 +347,7 @@ protected:
        std::vector<std::string> suffixes;
        std::vector<ExtractorBase *> extractors;
 
-       CollectionItemTypeBase() { }
+       CollectionItemTypeBase() = default;
 public:
        virtual ~CollectionItemTypeBase();