|
|
@@ -631,6 +631,19 @@ write(ostream &out, int indent_level) const {
|
|
|
indent(out, indent_level) << *this << "\n";
|
|
|
}
|
|
|
|
|
|
+////////////////////////////////////////////////////////////////////
|
|
|
+// Function: BitMask::operator bool
|
|
|
+// Access: Published
|
|
|
+// Description: The bool typecast operator returns true if any bits
|
|
|
+// are set, false if none of them is set. That is, true
|
|
|
+// if nonzero, false if zero.
|
|
|
+////////////////////////////////////////////////////////////////////
|
|
|
+template<class WType, int nbits>
|
|
|
+INLINE BitMask<WType, nbits>::
|
|
|
+operator bool () const {
|
|
|
+ return !is_zero();
|
|
|
+}
|
|
|
+
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: BitMask::operator ==
|
|
|
// Access: Published
|