mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Use AncestralClass to speed up Object::cast_to when possible.
This commit is contained in:
parent
149a4b4ca1
commit
96619d46a1
15 changed files with 62 additions and 8 deletions
|
|
@ -42,6 +42,8 @@ protected:
|
|||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
static constexpr AncestralClass static_ancestral_class = AncestralClass::REF_COUNTED;
|
||||
|
||||
_FORCE_INLINE_ bool is_referenced() const { return refcount_init.get() != 1; }
|
||||
bool init_ref();
|
||||
bool reference(); // returns false if refcount is at zero and didn't get increased
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue