]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/texture.cpp
Use constructor delegation instead of init functions when possible
[libs/gl.git] / source / core / texture.cpp
index 4968e2e678bd6103c239103828cc1c78b0ff4b2b..85f5fb5836ebdcdb56af17191343a9c2f21be9ea 100644 (file)
@@ -65,22 +65,10 @@ void Texture::load_image(const string &fn, unsigned lv)
 }
 
 
-Texture::Loader::Loader(Texture &t):
-       DataFile::CollectionObjectLoader<Texture>(t, 0)
+Texture::Loader::Loader(Texture &t, Collection *c):
+       CollectionObjectLoader<Texture>(t, c),
+       levels(0)
 {
-       init();
-}
-
-Texture::Loader::Loader(Texture &t, Collection &c):
-       DataFile::CollectionObjectLoader<Texture>(t, &c)
-{
-       init();
-}
-
-void Texture::Loader::init()
-{
-       levels = 0;
-
        add("external_image", &Loader::external_image);
        add("external_image_srgb", &Loader::external_image_srgb);
        add("generate_mipmap", &Loader::generate_mipmap);