|
@@ -699,6 +699,18 @@ operator >>= (int shift) {
|
|
|
_word >>= shift;
|
|
_word >>= shift;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+////////////////////////////////////////////////////////////////////
|
|
|
|
|
+// Function: BitMask::get_key
|
|
|
|
|
+// Access: Published
|
|
|
|
|
+// Description: Returns a mostly unique integer key per unique
|
|
|
|
|
+// bitmask, suitable for using in a hash table.
|
|
|
|
|
+////////////////////////////////////////////////////////////////////
|
|
|
|
|
+template<class WType, int nbits>
|
|
|
|
|
+INLINE int BitMask<WType, nbits>::
|
|
|
|
|
+get_key() const {
|
|
|
|
|
+ return (int)_word;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: BitMask::generate_hash
|
|
// Function: BitMask::generate_hash
|
|
|
// Access: Public
|
|
// Access: Public
|