]> git.tdb.fi Git - libs/datafile.git/commitdiff
Use dynamic_cast to support Collection as virtual base class
authorMikko Rasa <tdb@tdb.fi>
Sun, 20 Apr 2014 09:53:33 +0000 (12:53 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 20 Apr 2014 09:53:33 +0000 (12:53 +0300)
source/collection.h

index 5f0650c6761043977e85a33e55c6854d25b1703f..174c7fcabce52812083a7d8184670d2b24eda32e 100644 (file)
@@ -380,7 +380,7 @@ private:
                Creator(FuncPtr f): func(f) { }
 
                virtual T *create(Collection &coll, const std::string &name) const
-               { return (static_cast<C &>(coll).*func)(name); }
+               { return (dynamic_cast<C &>(coll).*func)(name); }
        };
 
        template<typename B>