summaryrefslogtreecommitdiff
path: root/src/video_core/textures/astc.cpp
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2020-03-13 22:30:31 -0300
committerGravatar ReinUsesLisp2020-03-13 22:30:31 -0300
commit5ed377b989b01141a65f02a0ae0a9ed52ce43346 (patch)
tree7d76d99551ba6a52f8c75594ad028abcbd536eec /src/video_core/textures/astc.cpp
parentastc: Rename C types to common_types (diff)
downloadyuzu-5ed377b989b01141a65f02a0ae0a9ed52ce43346.tar.gz
yuzu-5ed377b989b01141a65f02a0ae0a9ed52ce43346.tar.xz
yuzu-5ed377b989b01141a65f02a0ae0a9ed52ce43346.zip
astc: Make IntegerEncodedValue trivially copyable
Diffstat (limited to 'src/video_core/textures/astc.cpp')
-rw-r--r--src/video_core/textures/astc.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/video_core/textures/astc.cpp b/src/video_core/textures/astc.cpp
index 7d5796794..02cbad1ea 100644
--- a/src/video_core/textures/astc.cpp
+++ b/src/video_core/textures/astc.cpp
@@ -162,8 +162,8 @@ enum class IntegerEncoding { JustBits, Qus32, Trit };
162 162
163class IntegerEncodedValue { 163class IntegerEncodedValue {
164private: 164private:
165 const IntegerEncoding m_Encoding; 165 IntegerEncoding m_Encoding;
166 const u32 m_NumBits; 166 u32 m_NumBits;
167 u32 m_BitValue; 167 u32 m_BitValue;
168 union { 168 union {
169 u32 m_Qus32Value; 169 u32 m_Qus32Value;
@@ -171,13 +171,6 @@ private:
171 }; 171 };
172 172
173public: 173public:
174 // Jank, but we're not doing any heavy lifting in this class, so it's
175 // probably OK. It allows us to use these in std::vectors...
176 IntegerEncodedValue& operator=(const IntegerEncodedValue& other) {
177 new (this) IntegerEncodedValue(other);
178 return *this;
179 }
180
181 IntegerEncodedValue(IntegerEncoding encoding, u32 numBits) 174 IntegerEncodedValue(IntegerEncoding encoding, u32 numBits)
182 : m_Encoding(encoding), m_NumBits(numBits) {} 175 : m_Encoding(encoding), m_NumBits(numBits) {}
183 176