mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
let the empty bitmask evaluate to False in Python
This commit is contained in:
parent
b83c81bee4
commit
3ddad3e2d2
@ -833,6 +833,17 @@ get_key() const {
|
|||||||
return (int)_word;
|
return (int)_word;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: BitMask::__nonzero__
|
||||||
|
// Access: Published
|
||||||
|
// Description: Returns true if the bitmask is not zero.
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
template<class WType, int nbits>
|
||||||
|
INLINE bool BitMask<WType, nbits>::
|
||||||
|
__nonzero__() const {
|
||||||
|
return _word != 0;
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: BitMask::generate_hash
|
// Function: BitMask::generate_hash
|
||||||
// Access: Public
|
// Access: Public
|
||||||
|
@ -131,6 +131,8 @@ PUBLISHED:
|
|||||||
|
|
||||||
INLINE int get_key() const;
|
INLINE int get_key() const;
|
||||||
|
|
||||||
|
INLINE bool __nonzero__() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
INLINE void generate_hash(ChecksumHashGenerator &hashgen) const;
|
INLINE void generate_hash(ChecksumHashGenerator &hashgen) const;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user