summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2020-03-13 22:36:45 -0300
committerGravatar ReinUsesLisp2020-03-13 22:36:45 -0300
commit70a31eda62eba7f4e3a700a356dec08478efb5ef (patch)
treebc88dd9b864ab38ef8f2952cfdf70c6789503bee /src
parentastc: Make IntegerEncodedValue trivially copyable (diff)
downloadyuzu-70a31eda62eba7f4e3a700a356dec08478efb5ef.tar.gz
yuzu-70a31eda62eba7f4e3a700a356dec08478efb5ef.tar.xz
yuzu-70a31eda62eba7f4e3a700a356dec08478efb5ef.zip
astc: Make IntegerEncodedValue constructor constexpr
Diffstat (limited to 'src')
-rw-r--r--src/video_core/textures/astc.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/video_core/textures/astc.cpp b/src/video_core/textures/astc.cpp
index 02cbad1ea..f4513998c 100644
--- a/src/video_core/textures/astc.cpp
+++ b/src/video_core/textures/astc.cpp
@@ -162,16 +162,17 @@ enum class IntegerEncoding { JustBits, Qus32, Trit };
162 162
163class IntegerEncodedValue { 163class IntegerEncodedValue {
164private: 164private:
165 IntegerEncoding m_Encoding; 165 IntegerEncoding m_Encoding{};
166 u32 m_NumBits; 166 u32 m_NumBits = 0;
167 u32 m_BitValue; 167 u32 m_BitValue = 0;
168 union { 168 union {
169 u32 m_Qus32Value; 169 u32 m_Qus32Value = 0;
170 u32 m_TritValue; 170 u32 m_TritValue;
171 }; 171 };
172 172
173public: 173public:
174 IntegerEncodedValue(IntegerEncoding encoding, u32 numBits) 174 constexpr IntegerEncodedValue() = default;
175 constexpr IntegerEncodedValue(IntegerEncoding encoding, u32 numBits)
175 : m_Encoding(encoding), m_NumBits(numBits) {} 176 : m_Encoding(encoding), m_NumBits(numBits) {}
176 177
177 IntegerEncoding GetEncoding() const { 178 IntegerEncoding GetEncoding() const {