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
|
|
@ -179,7 +179,7 @@ private:
|
|||
RID rid;
|
||||
|
||||
void _clear_children() {
|
||||
RichTextLabel *owner_rtl = Object::cast_to<RichTextLabel>(ObjectDB::get_instance(owner));
|
||||
RichTextLabel *owner_rtl = ObjectDB::get_instance<RichTextLabel>(owner);
|
||||
while (subitems.size()) {
|
||||
Item *subitem = subitems.front()->get();
|
||||
if (subitem && subitem->rid.is_valid() && owner_rtl) {
|
||||
|
|
@ -249,7 +249,7 @@ private:
|
|||
ItemImage() { type = ITEM_IMAGE; }
|
||||
~ItemImage() {
|
||||
if (image.is_valid()) {
|
||||
RichTextLabel *owner_rtl = Object::cast_to<RichTextLabel>(ObjectDB::get_instance(owner));
|
||||
RichTextLabel *owner_rtl = ObjectDB::get_instance<RichTextLabel>(owner);
|
||||
if (owner_rtl) {
|
||||
image->disconnect_changed(callable_mp(owner_rtl, &RichTextLabel::_texture_changed));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue