From c99e14d12be7797984cca0614de28ecda86f4af4 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 19 Aug 2018 10:52:33 +0200 Subject: Factor out const bitvec operators --- chilbert/FixBitVec.hpp | 42 ------------------------------------------ 1 file changed, 42 deletions(-) (limited to 'chilbert/FixBitVec.hpp') diff --git a/chilbert/FixBitVec.hpp b/chilbert/FixBitVec.hpp index f782723..0eab0e9 100644 --- a/chilbert/FixBitVec.hpp +++ b/chilbert/FixBitVec.hpp @@ -183,26 +183,12 @@ public: return *this; } - CFixBitVec operator&(const CFixBitVec& vec) const - { - CFixBitVec t(*this); - t &= vec; - return t; - } - CFixBitVec& operator|=(const CFixBitVec& vec) { m_rack |= vec.m_rack; return *this; } - CFixBitVec operator|(const CFixBitVec& vec) const - { - CFixBitVec t(*this); - t |= vec; - return t; - } - CFixBitVec& operator^=(const CFixBitVec& vec) { m_rack ^= vec.m_rack; @@ -215,20 +201,6 @@ public: return *this; } - CFixBitVec operator^(const CFixBitVec& vec) const - { - CFixBitVec t(*this); - t ^= vec; - return t; - } - - CFixBitVec operator~() const - { - CFixBitVec t(*this); - t.flip(); - return t; - } - CFixBitVec& operator<<=(const size_t bits) { assert(bits < size()); @@ -236,13 +208,6 @@ public: return *this; } - CFixBitVec operator<<(const size_t bits) const - { - CFixBitVec t(*this); - t <<= bits; - return t; - } - CFixBitVec& operator>>=(const size_t bits) { assert(bits < size()); @@ -250,13 +215,6 @@ public: return *this; } - CFixBitVec operator>>(const size_t bits) const - { - CFixBitVec t(*this); - t >>= bits; - return t; - } - /// Right-rotate by `bits` positions CFixBitVec& rotr(const size_t bits) { -- cgit v1.2.1