Add utility operators for LayersMask bit operations

This commit is contained in:
Wojtek Figat
2025-03-28 10:48:41 +01:00
parent 0041a17b7d
commit cc32af3919

View File

@@ -78,6 +78,29 @@ public:
{
return ~Mask;
}
LayersMask operator~() const
{
return ~Mask;
}
LayersMask& operator|=(const LayersMask& other)
{
Mask |= other.Mask;
return *this;
}
LayersMask& operator&=(const LayersMask& other)
{
Mask &= other.Mask;
return *this;
}
LayersMask& operator^=(const LayersMask& other)
{
Mask ^= other.Mask;
return *this;
}
};
// @formatter:off