From e3fadb9616f20c3fe4c11ccd88394aa922115f56 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 17 Jul 2018 23:08:00 -0400 Subject: 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. --- src/video_core/textures/astc.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/video_core/textures') 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: template class Bits { -private: - const IntType& m_Bits; - - // Don't copy - Bits() {} - Bits(const Bits&) {} - Bits& operator=(const Bits&) {} - public: explicit Bits(IntType& v) : m_Bits(v) {} + Bits(const Bits&) = delete; + Bits& operator=(const Bits&) = delete; + uint8_t operator[](uint32_t bitPos) { return static_cast((m_Bits >> bitPos) & 1); } @@ -132,6 +127,9 @@ public: uint64_t mask = (1 << (end - start + 1)) - 1; return (m_Bits >> start) & mask; } + +private: + const IntType& m_Bits; }; enum EIntegerEncoding { eIntegerEncoding_JustBits, eIntegerEncoding_Quint, eIntegerEncoding_Trit }; -- cgit v1.2.3