mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Add templated version of ObjectDB::get_instance()
This commit is contained in:
parent
594d64ec24
commit
bc9d0c7835
49 changed files with 121 additions and 104 deletions
|
|
@ -285,3 +285,8 @@ struct VariantInternalAccessor<const Ref<T> &> {
|
|||
// Zero-constructing Ref initializes reference to nullptr (and thus empty).
|
||||
template <typename T>
|
||||
struct is_zero_constructible<Ref<T>> : std::true_type {};
|
||||
|
||||
template <typename T>
|
||||
Ref<T> ObjectDB::get_ref(ObjectID p_instance_id) {
|
||||
return Ref<T>(get_instance(p_instance_id));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue