mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
add get_key() method for Python hashing
This commit is contained in:
parent
936e6dcbbc
commit
490d24ef41
@ -699,6 +699,18 @@ operator >>= (int 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
|
||||
// Access: Public
|
||||
|
@ -114,6 +114,8 @@ PUBLISHED:
|
||||
INLINE void operator <<= (int shift);
|
||||
INLINE void operator >>= (int shift);
|
||||
|
||||
INLINE int get_key() const;
|
||||
|
||||
public:
|
||||
INLINE void generate_hash(ChecksumHashGenerator &hashgen) const;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user