summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Lioncash2018-07-17 23:08:00 -0400
committerGravatar Lioncash2018-07-17 23:58:14 -0400
commite3fadb9616f20c3fe4c11ccd88394aa922115f56 (patch)
tree57ea80a3321eceeadc54c35ddc492283797864bc
parentastc: In-class initialize member variables where appropriate (diff)
downloadyuzu-e3fadb9616f20c3fe4c11ccd88394aa922115f56.tar.gz
yuzu-e3fadb9616f20c3fe4c11ccd88394aa922115f56.tar.xz
yuzu-e3fadb9616f20c3fe4c11ccd88394aa922115f56.zip
astc: Delete Bits' copy contstructor and assignment operator
This also potentially avoids warnings, considering the copy assignment operator is supposed to have a return value.
-rw-r--r--src/video_core/textures/astc.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/video_core/textures/astc.cpp b/src/video_core/textures/astc.cpp
index b2adbe888..bafd137d5 100644
--- a/src/video_core/textures/astc.cpp
+++ b/src/video_core/textures/astc.cpp
@@ -105,17 +105,12 @@ private:
105 105
106template <typename IntType> 106template <typename IntType>
107class Bits { 107class Bits {
108private:
109 const IntType& m_Bits;
110
111 // Don't copy
112 Bits() {}
113 Bits(const Bits&) {}
114 Bits& operator=(const Bits&) {}
115
116public: 108public:
117 explicit Bits(IntType& v) : m_Bits(v) {} 109 explicit Bits(IntType& v) : m_Bits(v) {}
118 110
111 Bits(const Bits&) = delete;
112 Bits& operator=(const Bits&) = delete;
113
119 uint8_t operator[](uint32_t bitPos) { 114 uint8_t operator[](uint32_t bitPos) {
120 return static_cast<uint8_t>((m_Bits >> bitPos) & 1); 115 return static_cast<uint8_t>((m_Bits >> bitPos) & 1);
121 } 116 }
@@ -132,6 +127,9 @@ public:
132 uint64_t mask = (1 << (end - start + 1)) - 1; 127 uint64_t mask = (1 << (end - start + 1)) - 1;
133 return (m_Bits >> start) & mask; 128 return (m_Bits >> start) & mask;
134 } 129 }
130
131private:
132 const IntType& m_Bits;
135}; 133};
136 134
137enum EIntegerEncoding { eIntegerEncoding_JustBits, eIntegerEncoding_Quint, eIntegerEncoding_Trit }; 135enum EIntegerEncoding { eIntegerEncoding_JustBits, eIntegerEncoding_Quint, eIntegerEncoding_Trit };