diff --git a/quicktex/s3tc/bc1/BC1Block.h b/quicktex/s3tc/bc1/BC1Block.h index 15966a9..4bde4b1 100644 --- a/quicktex/s3tc/bc1/BC1Block.h +++ b/quicktex/s3tc/bc1/BC1Block.h @@ -47,13 +47,11 @@ class alignas(8) BC1Block { std::array _selectors; public: - /// Create a new BC1Block - constexpr BC1Block() { + /// Create a new BC1Blok + constexpr BC1Block() : _color0(), _color1(), _selectors() { static_assert(sizeof(BC1Block) == 8); static_assert(sizeof(std::array) == 8 * 10); static_assert(alignof(BC1Block) >= 8); - _color0 = _color1 = {0, 0}; - _selectors = {0, 0, 0, 0}; } /** diff --git a/quicktex/s3tc/bc3/BC3Block.h b/quicktex/s3tc/bc3/BC3Block.h index db64637..07d005b 100644 --- a/quicktex/s3tc/bc3/BC3Block.h +++ b/quicktex/s3tc/bc3/BC3Block.h @@ -36,12 +36,10 @@ class alignas(8) BC3Block { BC4Block alpha_block; BC1Block color_block; - constexpr BC3Block() { + constexpr BC3Block() : alpha_block(BC4Block()), color_block(BC1Block()) { static_assert(sizeof(BC3Block) == 16); static_assert(sizeof(std::array) == 16 * 10); static_assert(alignof(BC3Block) >= 8); - alpha_block = BC4Block(); - color_block = BC1Block(); } BC3Block(const BC4Block &alpha, const BC1Block &color) { @@ -56,7 +54,7 @@ class alignas(8) BC3Block { color_block = blocks.second; } - bool operator==(const BC3Block& other) const = default; - bool operator!=(const BC3Block& other) const = default; + bool operator==(const BC3Block &other) const = default; + bool operator!=(const BC3Block &other) const = default; }; } // namespace quicktex::s3tc \ No newline at end of file diff --git a/quicktex/s3tc/bc4/BC4Block.h b/quicktex/s3tc/bc4/BC4Block.h index a6a500e..c4fbfa0 100644 --- a/quicktex/s3tc/bc4/BC4Block.h +++ b/quicktex/s3tc/bc4/BC4Block.h @@ -48,12 +48,10 @@ class alignas(8) BC4Block { // Constructors /// Create a new BC4Block - constexpr BC4Block() { + constexpr BC4Block() : alpha0(0), alpha1(0), _selectors() { static_assert(sizeof(BC4Block) == 8); static_assert(sizeof(std::array) == 8 * 10); static_assert(alignof(BC4Block) >= 8); - alpha0 = alpha1 = 0; - _selectors = {0, 0, 0, 0, 0, 0}; } /** diff --git a/quicktex/s3tc/bc5/BC5Block.h b/quicktex/s3tc/bc5/BC5Block.h index 429f2ae..17edadb 100644 --- a/quicktex/s3tc/bc5/BC5Block.h +++ b/quicktex/s3tc/bc5/BC5Block.h @@ -35,11 +35,10 @@ class alignas(8) BC5Block { BC4Block chan0_block; BC4Block chan1_block; - constexpr BC5Block() { + constexpr BC5Block() : chan0_block(BC4Block()), chan1_block(BC4Block()) { static_assert(sizeof(BC5Block) == 16); static_assert(sizeof(std::array) == 16 * 10); static_assert(alignof(BC5Block) >= 8); - chan0_block = chan1_block = BC4Block(); } BC5Block(const BC4Block &chan0, const BC4Block &chan1) { @@ -54,7 +53,7 @@ class alignas(8) BC5Block { chan1_block = pair.second; } - bool operator==(const BC5Block& other) const = default; - bool operator!=(const BC5Block& other) const = default; + bool operator==(const BC5Block &other) const = default; + bool operator!=(const BC5Block &other) const = default; }; } // namespace quicktex::s3tc \ No newline at end of file