mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-24 18:32:49 -06:00
astc: Make IntegerEncodedValue trivially copyable
This commit is contained in:
parent
e7d97605e8
commit
5ed377b989
1 changed files with 2 additions and 9 deletions
|
@ -162,8 +162,8 @@ enum class IntegerEncoding { JustBits, Qus32, Trit };
|
||||||
|
|
||||||
class IntegerEncodedValue {
|
class IntegerEncodedValue {
|
||||||
private:
|
private:
|
||||||
const IntegerEncoding m_Encoding;
|
IntegerEncoding m_Encoding;
|
||||||
const u32 m_NumBits;
|
u32 m_NumBits;
|
||||||
u32 m_BitValue;
|
u32 m_BitValue;
|
||||||
union {
|
union {
|
||||||
u32 m_Qus32Value;
|
u32 m_Qus32Value;
|
||||||
|
@ -171,13 +171,6 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Jank, but we're not doing any heavy lifting in this class, so it's
|
|
||||||
// probably OK. It allows us to use these in std::vectors...
|
|
||||||
IntegerEncodedValue& operator=(const IntegerEncodedValue& other) {
|
|
||||||
new (this) IntegerEncodedValue(other);
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
IntegerEncodedValue(IntegerEncoding encoding, u32 numBits)
|
IntegerEncodedValue(IntegerEncoding encoding, u32 numBits)
|
||||||
: m_Encoding(encoding), m_NumBits(numBits) {}
|
: m_Encoding(encoding), m_NumBits(numBits) {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue