mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-22 10:04:39 +00:00
bit_array: Remove non const operator~ (#3161)
This commit is contained in:
parent
0a58ead5f6
commit
8e44a7099f
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -408,4 +403,4 @@ private:
|
|||||||
std::array<u64, WORD_COUNT> data{};
|
std::array<u64, WORD_COUNT> data{};
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Common
|
} // namespace Common
|
||||||
|
Loading…
Reference in New Issue
Block a user