diff options
author | David Robillard <d@drobilla.net> | 2018-08-11 18:12:11 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-09-29 14:46:18 +0200 |
commit | 59a618492e083291f50ac47cf2adc88dac33b6ce (patch) | |
tree | 40b5c3bac147324a86fc6c9146eb90c7d1d2f48a | |
parent | a0a6ee8f787c07fb7ca5b63a52131660eed26586 (diff) | |
download | chilbert-59a618492e083291f50ac47cf2adc88dac33b6ce.tar.gz chilbert-59a618492e083291f50ac47cf2adc88dac33b6ce.tar.bz2 chilbert-59a618492e083291f50ac47cf2adc88dac33b6ce.zip |
Rename toggle() to flip() to match std::bitset
-rw-r--r-- | chilbert/Algorithm.hpp | 8 | ||||
-rw-r--r-- | chilbert/BigBitVec.hpp | 4 | ||||
-rw-r--r-- | chilbert/FixBitVec.hpp | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/chilbert/Algorithm.hpp b/chilbert/Algorithm.hpp index d4896ec..9d6fd52 100644 --- a/chilbert/Algorithm.hpp +++ b/chilbert/Algorithm.hpp @@ -76,7 +76,7 @@ update1(const I& l, const I& t, const I& w, int n, I& e, int& d) { assert(0 <= d && d < n); e = l; - e.toggle(d); //#D d == n-1 ? 0 : d+1 ); + e.flip(d); //#D d == n-1 ? 0 : d+1 ); // Update direction d += 1 + t.fsb(); @@ -89,7 +89,7 @@ update1(const I& l, const I& t, const I& w, int n, I& e, int& d) assert(0 <= d && d < n); if (!(w.rack() & 1)) { - e.toggle(d == 0 ? n - 1 : d - 1); //#D d ); + e.flip(d == 0 ? n - 1 : d - 1); //#D d ); } } @@ -100,7 +100,7 @@ update2(const I& l, const I& t, const I& w, int n, I& e, int& d) { assert(0 <= d && d < n); e = l; - e.toggle(d); //#D d == n-1 ? 0 : d+1 ); + e.flip(d); //#D d == n-1 ? 0 : d+1 ); // Update direction d += 1 + t.fsb(); @@ -152,7 +152,7 @@ _coordsToIndex(const P* p, w = t; if (i < m - 1) { - w.toggle(n - 1); + w.flip(n - 1); } // Concatenate to the index. diff --git a/chilbert/BigBitVec.hpp b/chilbert/BigBitVec.hpp index d25d1c8..c395b05 100644 --- a/chilbert/BigBitVec.hpp +++ b/chilbert/BigBitVec.hpp @@ -182,8 +182,8 @@ public: return *this; } - /// Toggle the value of the `index`th bit - CBigBitVec& toggle(const int index) + /// Flip the value of the `index`th bit + CBigBitVec& flip(const int index) { assert(index >= 0 && index < size()); int r, b; diff --git a/chilbert/FixBitVec.hpp b/chilbert/FixBitVec.hpp index bec5ba1..a1a415e 100644 --- a/chilbert/FixBitVec.hpp +++ b/chilbert/FixBitVec.hpp @@ -81,8 +81,8 @@ public: return *this; } - /// Toggle the value of the `index`th bit - CFixBitVec& toggle(const int index) + /// Flip the value of the `index`th bit + CFixBitVec& flip(const int index) { assert(0 <= index && index < FBV_BITS); m_rack ^= (FBV1 << index); |