mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
operator bool()
This commit is contained in:
parent
a6f4fb2377
commit
5d73bc8e19
@ -222,6 +222,17 @@ is_empty() const {
|
||||
return (_head == (NodePathComponent *)NULL);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: NodePath::operator bool
|
||||
// Access: Published
|
||||
// Description: Returns true if the NodePath is valid (not empty),
|
||||
// or false if it contains no nodes.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE NodePath::
|
||||
operator bool () const {
|
||||
return !is_empty();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: NodePath::is_singleton
|
||||
// Access: Published
|
||||
|
@ -177,6 +177,8 @@ PUBLISHED:
|
||||
|
||||
// Methods to query a NodePath's contents.
|
||||
INLINE bool is_empty() const;
|
||||
INLINE operator bool () const;
|
||||
|
||||
INLINE bool is_singleton(Thread *current_thread = Thread::get_current_thread()) const;
|
||||
int get_num_nodes(Thread *current_thread = Thread::get_current_thread()) const;
|
||||
PandaNode *get_node(int index, Thread *current_thread = Thread::get_current_thread()) const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user