summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/class_db.cpp5
-rw-r--r--core/reference.h8
2 files changed, 5 insertions, 8 deletions
diff --git a/core/class_db.cpp b/core/class_db.cpp
index 2fd0ee2d89..a2941d70f6 100644
--- a/core/class_db.cpp
+++ b/core/class_db.cpp
@@ -1410,10 +1410,7 @@ Variant ClassDB::class_get_default_property_value(const StringName &p_class, con
cleanup_c = false;
} else if (ClassDB::can_instance(p_class)) {
c = ClassDB::instance(p_class);
-#ifndef _MSC_VER
-#warning FIXME: ObjectID refactoring broke GDScript handling of reference pointers, this needs a proper fix.
-#endif
- cleanup_c = (p_class != StringName("GDScript"));
+ cleanup_c = true;
}
if (c) {
diff --git a/core/reference.h b/core/reference.h
index b01e0035a7..36e7d5c6a6 100644
--- a/core/reference.h
+++ b/core/reference.h
@@ -170,9 +170,9 @@ public:
return;
}
- Reference *r = Object::cast_to<Reference>(object);
+ T *r = Object::cast_to<T>(object);
if (r && r->reference()) {
- reference = static_cast<T *>(r);
+ reference = r;
}
}
@@ -226,9 +226,9 @@ public:
return;
}
- Reference *r = Object::cast_to<Reference>(object);
+ T *r = Object::cast_to<T>(object);
if (r && r->reference()) {
- reference = static_cast<T *>(r);
+ reference = r;
} else {
reference = nullptr;
}