From 98430f99d1a5c62931e0421b0132960fca6f1fd7 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Wed, 26 Mar 2025 18:48:52 +0000 Subject: [PATCH] Codechange: Add parameterless Flip() method to BaseBitSet. This allows flipping all valid bits. --- src/core/base_bitset_type.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/core/base_bitset_type.hpp b/src/core/base_bitset_type.hpp index 9ce8528d31..d8254bcd21 100644 --- a/src/core/base_bitset_type.hpp +++ b/src/core/base_bitset_type.hpp @@ -108,6 +108,16 @@ public: return static_cast(*this); } + /** + * Flip all bits. + * @returns The bit set + */ + inline constexpr Timpl &Flip() + { + this->data ^= Tmask; + return static_cast(*this); + } + /** * Flip the value-th bit. * @param value Bit to flip.