Call parent constructors. Todo: I need to figure out how godot manages to get away without doing this.

This commit is contained in:
Relintai 2021-08-21 16:39:38 +02:00
parent a8cb81598b
commit 464576468b
2 changed files with 10 additions and 8 deletions

View File

@ -30,7 +30,8 @@ bool Reference::unreference() {
return die; return die;
} }
Reference::Reference() { Reference::Reference() :
Object() {
refcount.init(); refcount.init();
refcount_init.init(); refcount_init.init();
} }

View File

@ -291,7 +291,8 @@ Resource::Resource() {
register_properties(); register_properties();
} }
Resource::~Resource() { Resource::~Resource() :
Reference() {
std::map<std::string, ResourcePropertyBase *>::iterator it; std::map<std::string, ResourcePropertyBase *>::iterator it;
for (it = _property_map.begin(); it != _property_map.end(); it++) { for (it = _property_map.begin(); it != _property_map.end(); it++) {