diff --git a/panda/src/putil/bitMask.I b/panda/src/putil/bitMask.I index 9c7de08321..125bf564d1 100644 --- a/panda/src/putil/bitMask.I +++ b/panda/src/putil/bitMask.I @@ -821,6 +821,18 @@ 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::get_key // Access: Published diff --git a/panda/src/putil/bitMask.h b/panda/src/putil/bitMask.h index fdc3b58fc1..318ced9665 100644 --- a/panda/src/putil/bitMask.h +++ b/panda/src/putil/bitMask.h @@ -118,6 +118,8 @@ PUBLISHED: INLINE void operator <<= (int shift); INLINE void operator >>= (int shift); + INLINE operator WType () const; + INLINE void flood_down_in_place(); INLINE void flood_up_in_place(); INLINE BitMask flood_bits_down() const;