bit_array: Remove non const operator~ (#3161)
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions

This commit is contained in:
TheTurtle 2025-06-27 04:07:56 +03:00 committed by GitHub
parent 0a58ead5f6
commit 8e44a7099f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -361,13 +361,6 @@ public:
return *this; return *this;
} }
inline constexpr BitArray& operator~() {
for (size_t i = 0; i < WORD_COUNT; ++i) {
data[i] = ~data[i];
}
return *this;
}
inline constexpr BitArray operator|(const BitArray& other) const { inline constexpr BitArray operator|(const BitArray& other) const {
BitArray result = *this; BitArray result = *this;
result |= other; result |= other;
@ -388,7 +381,9 @@ public:
inline constexpr BitArray operator~() const { inline constexpr BitArray operator~() const {
BitArray result = *this; BitArray result = *this;
result = ~result; for (size_t i = 0; i < WORD_COUNT; ++i) {
result.data[i] = ~result.data[i];
}
return result; return result;
} }