diff --git a/panda/src/putil/bitMask.I b/panda/src/putil/bitMask.I index 9c7de08321..53bdbe48fd 100644 --- a/panda/src/putil/bitMask.I +++ b/panda/src/putil/bitMask.I @@ -821,6 +821,29 @@ operator >>= (int shift) { _word >>= shift; } +//////////////////////////////////////////////////////////////////// +// Function: BitMask::operator WType +// Access: Published +// Description: Used to cast this BitMask back into the +// underlying integer type. +//////////////////////////////////////////////////////////////////// +template +INLINE BitMask:: +operator WType () const { + return _word; +} + +//////////////////////////////////////////////////////////////////// +// Function: BitMask::operator bool +// Access: Published +// Description: Will return true, unless all bits are off. +//////////////////////////////////////////////////////////////////// +template +INLINE BitMask:: +operator bool () const { + return (_word != 0); +} + //////////////////////////////////////////////////////////////////// // Function: BitMask::get_key // Access: Published