Bläddra i källkod

actually remove operator bool, but keep operator WType

rdb 13 år sedan
förälder
incheckning
32ec1fbc77
2 ändrade filer med 2 tillägg och 11 borttagningar
  1. 0 11
      panda/src/putil/bitMask.I
  2. 2 0
      panda/src/putil/bitMask.h

+ 0 - 11
panda/src/putil/bitMask.I

@@ -833,17 +833,6 @@ operator WType () const {
   return _word;
   return _word;
 }
 }
 
 
-////////////////////////////////////////////////////////////////////
-//     Function: BitMask::operator bool
-//       Access: Published
-//  Description: Will return true, unless all bits are off.
-////////////////////////////////////////////////////////////////////
-template<class WType, int nbits>
-INLINE BitMask<WType, nbits>::
-operator bool () const {
-  return (_word != 0);
-}
-
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: BitMask::get_key
 //     Function: BitMask::get_key
 //       Access: Published
 //       Access: Published

+ 2 - 0
panda/src/putil/bitMask.h

@@ -118,6 +118,8 @@ PUBLISHED:
   INLINE void operator <<= (int shift);
   INLINE void operator <<= (int shift);
   INLINE void operator >>= (int shift);
   INLINE void operator >>= (int shift);
 
 
+  INLINE operator WType () const;
+
   INLINE void flood_down_in_place();
   INLINE void flood_down_in_place();
   INLINE void flood_up_in_place();
   INLINE void flood_up_in_place();
   INLINE BitMask<WType, nbits> flood_bits_down() const;
   INLINE BitMask<WType, nbits> flood_bits_down() const;