]> git.tdb.fi Git - libs/datafile.git/commitdiff
Make Loader a virtual base of ObjectLoader to permit diamond inheritance
authorMikko Rasa <tdb@tdb.fi>
Wed, 15 Oct 2014 18:22:07 +0000 (21:22 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 15 Oct 2014 18:22:07 +0000 (21:22 +0300)
Useful when creating loader classes through composition.

source/objectloader.h

index a2a8720e840e6393f3e185950741fc6ba0df5729..76fc412abed60db13c7b7e4b80837ffad0ca93df 100644 (file)
@@ -20,7 +20,7 @@ Provides the basic functionality of an object loader.  Deriving from this
 allows loading values directly into member variables of the objects.
 */
 template<typename O>
-class ObjectLoader: public Loader
+class ObjectLoader: virtual public Loader
 {
 public:
        typedef O Object;