]> git.tdb.fi Git - libs/gl.git/commitdiff
Use default member initializers in Texture
authorMikko Rasa <tdb@tdb.fi>
Sat, 4 Dec 2021 00:22:39 +0000 (02:22 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sat, 4 Dec 2021 00:25:41 +0000 (02:25 +0200)
source/core/texture.cpp
source/core/texture.h

index b8a2614a1da9b697410067a7daaad807476ace7c..73dd39b6c5cf79a5662a31ff3846b8981fc677b6 100644 (file)
@@ -15,12 +15,7 @@ namespace Msp {
 namespace GL {
 
 Texture::Texture(unsigned t):
-       TextureBackend(t),
-       format(NO_PIXELFORMAT),
-       storage_fmt(format),
-       swizzle(NO_SWIZZLE),
-       use_srgb_format(false),
-       auto_gen_mipmap(false)
+       TextureBackend(t)
 { }
 
 void Texture::set_format(PixelFormat fmt)
index f6436c0acc8f6e51d7d8679710bbaf47ad29b67b..24d74964e04dd35c6e8f6092d41b0b854b713c98 100644 (file)
@@ -70,11 +70,11 @@ public:
        };
 
 protected:
-       PixelFormat format;
-       PixelFormat storage_fmt;
-       ComponentSwizzle swizzle;
-       bool use_srgb_format;
-       bool auto_gen_mipmap;
+       PixelFormat format = NO_PIXELFORMAT;
+       PixelFormat storage_fmt = NO_PIXELFORMAT;
+       ComponentSwizzle swizzle = NO_SWIZZLE;
+       bool use_srgb_format = false;
+       bool auto_gen_mipmap = false;
 
        Texture(unsigned);