mirror of https://github.com/OpenTTD/OpenTTD
Codechange: Add parameterless Flip() method to BaseBitSet.
This allows flipping all valid bits.pull/14292/head
parent
4b6d409ee8
commit
98430f99d1
|
@ -108,6 +108,16 @@ public:
|
||||||
return static_cast<Timpl&>(*this);
|
return static_cast<Timpl&>(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Flip all bits.
|
||||||
|
* @returns The bit set
|
||||||
|
*/
|
||||||
|
inline constexpr Timpl &Flip()
|
||||||
|
{
|
||||||
|
this->data ^= Tmask;
|
||||||
|
return static_cast<Timpl&>(*this);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flip the value-th bit.
|
* Flip the value-th bit.
|
||||||
* @param value Bit to flip.
|
* @param value Bit to flip.
|
||||||
|
|
Loading…
Reference in New Issue