1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-22 15:06:45 +00:00

Add templated version of ObjectDB::get_instance()

This commit is contained in:
kobewi
2025-03-27 14:42:42 +01:00
parent 594d64ec24
commit bc9d0c7835
49 changed files with 121 additions and 104 deletions

View File

@@ -63,7 +63,7 @@ void Tweener::start() {
}
Ref<Tween> Tweener::_get_tween() {
return Ref<Tween>(ObjectDB::get_instance(tween_id));
return ObjectDB::get_ref<Tween>(tween_id);
}
void Tweener::_finish() {
@@ -432,7 +432,7 @@ bool Tween::can_process(bool p_tree_paused) const {
Node *Tween::get_bound_node() const {
if (is_bound) {
return Object::cast_to<Node>(ObjectDB::get_instance(bound_node));
return ObjectDB::get_instance<Node>(bound_node);
} else {
return nullptr;
}