]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/loader.h
Make Loader::ActionMap delete the actions
[libs/datafile.git] / source / loader.h
index 9736d269d90ffdde9e83ea7a835032cad98ebd16..fe8f0aa54f7621939b1bc2cba946f0f10ca58d0d 100644 (file)
@@ -36,7 +36,11 @@ See also classes ObjectLoader and CollectionObjectLoader in objectloader.h.
 class Loader: private NonCopyable
 {
 protected:
-       typedef std::map<StatementKey, LoaderAction *> ActionMap;
+       class ActionMap: public std::map<StatementKey, LoaderAction *>, private NonCopyable
+       {
+       public:
+               ~ActionMap();
+       };
 
 private:
        ActionMap local_actions;
@@ -52,7 +56,7 @@ protected:
 
        Loader();
 public:
-       virtual ~Loader();
+       virtual ~Loader() { }
 
        /** Loads statements from a parser. */
        void load(Parser &p);