]> git.tdb.fi Git - libs/gl.git/blobdiff - source/backends/opengl/texture2d_backend.cpp
Use default member initializers in async loaders
[libs/gl.git] / source / backends / opengl / texture2d_backend.cpp
index 2f7e503b7d42a9aec7e8055a38fa2446e5805a0a..9efc4351e65b47e8c6a08dda88d5cb3d344e4565 100644 (file)
@@ -16,11 +16,11 @@ private:
        Texture2D &texture;
        IO::Seekable &io;
        Buffer pixel_buffer;
-       char *mapped_address;
+       char *mapped_address = 0;
        Graphics::Image image;
-       Graphics::ImageLoader *img_loader;
-       unsigned n_bytes;
-       int phase;
+       Graphics::ImageLoader *img_loader = 0;
+       unsigned n_bytes = 0;
+       int phase = 0;
 
 public:
        AsyncLoader(Texture2D &, IO::Seekable &);
@@ -106,9 +106,7 @@ void OpenGLTexture2D::unload()
 OpenGLTexture2D::AsyncLoader::AsyncLoader(Texture2D &t, IO::Seekable &i):
        texture(t),
        io(i),
-       mapped_address(0),
-       img_loader(Graphics::ImageLoader::open_io(io)),
-       phase(0)
+       img_loader(Graphics::ImageLoader::open_io(io))
 { }
 
 OpenGLTexture2D::AsyncLoader::~AsyncLoader()