From: Mikko Rasa Date: Sat, 4 Dec 2021 00:22:39 +0000 (+0200) Subject: Use default member initializers in Texture X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=d0df3ba82b187705331e2cc55d515c2d44e7f466;p=libs%2Fgl.git Use default member initializers in Texture --- diff --git a/source/core/texture.cpp b/source/core/texture.cpp index b8a2614a..73dd39b6 100644 --- a/source/core/texture.cpp +++ b/source/core/texture.cpp @@ -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) diff --git a/source/core/texture.h b/source/core/texture.h index f6436c0a..24d74964 100644 --- a/source/core/texture.h +++ b/source/core/texture.h @@ -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);