]> git.tdb.fi Git - libs/gl.git/blobdiff - source/render/scene.cpp
Use constructor delegation instead of init functions when possible
[libs/gl.git] / source / render / scene.cpp
index 87d8c423852ac749ec29a45e9af7331c5f214031..229588679af54726cb3a203ed3d8b21a1e4330c9 100644 (file)
@@ -89,24 +89,11 @@ Scene::SceneRegistry &Scene::get_scene_registry()
 }
 
 
-Scene::Loader::Loader(Scene &s, Collection &c):
+Scene::Loader::Loader(Scene &s, Collection &c, ContentMap *m):
        DataFile::CollectionObjectLoader<Scene>(s, &c),
-       content(0)
+       content(m),
+       inst_counter(0)
 {
-       init();
-}
-
-Scene::Loader::Loader(Scene &s, Collection &c, ContentMap &m):
-       DataFile::CollectionObjectLoader<Scene>(s, &c),
-       content(&m)
-{
-       init();
-}
-
-void Scene::Loader::init()
-{
-       inst_counter = 0;
-
        add("object", &Loader::object);
        add("object", &Loader::object_tagged);
        add("scene", &Loader::scene);