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:
Thaddeus Crews 2025-03-31 12:03:47 -05:00
commit 8f6bb119f4
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
49 changed files with 121 additions and 104 deletions

View file

@ -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));
}