mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Merge pull request #100602 from KoBeWi/over_100_changes_in_50_random_files_aka_the_best_kind_of_PR
Add templated version of `ObjectDB::get_instance()`
This commit is contained in:
commit
8f6bb119f4
49 changed files with 121 additions and 104 deletions
|
|
@ -299,3 +299,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