mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-25 10:52:48 -06:00
astc: Make IntegerEncodedValue constructor constexpr
This commit is contained in:
parent
5ed377b989
commit
70a31eda62
1 changed files with 6 additions and 5 deletions
|
@ -162,16 +162,17 @@ enum class IntegerEncoding { JustBits, Qus32, Trit };
|
||||||
|
|
||||||
class IntegerEncodedValue {
|
class IntegerEncodedValue {
|
||||||
private:
|
private:
|
||||||
IntegerEncoding m_Encoding;
|
IntegerEncoding m_Encoding{};
|
||||||
u32 m_NumBits;
|
u32 m_NumBits = 0;
|
||||||
u32 m_BitValue;
|
u32 m_BitValue = 0;
|
||||||
union {
|
union {
|
||||||
u32 m_Qus32Value;
|
u32 m_Qus32Value = 0;
|
||||||
u32 m_TritValue;
|
u32 m_TritValue;
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IntegerEncodedValue(IntegerEncoding encoding, u32 numBits)
|
constexpr IntegerEncodedValue() = default;
|
||||||
|
constexpr IntegerEncodedValue(IntegerEncoding encoding, u32 numBits)
|
||||||
: m_Encoding(encoding), m_NumBits(numBits) {}
|
: m_Encoding(encoding), m_NumBits(numBits) {}
|
||||||
|
|
||||||
IntegerEncoding GetEncoding() const {
|
IntegerEncoding GetEncoding() const {
|
||||||
|
|
Loading…
Reference in a new issue