Initialize class/struct variables with default values in modules/

This commit is contained in:
Rafał Mikrut 2021-02-08 10:57:18 +01:00
parent 57e2822a05
commit f7209b459b
100 changed files with 533 additions and 772 deletions

View file

@ -219,7 +219,7 @@ StringName GDScript::get_instance_base_type() const {
}
struct _GDScriptMemberSort {
int index;
int index = 0;
StringName name;
_FORCE_INLINE_ bool operator<(const _GDScriptMemberSort &p_member) const { return index < p_member.index; }
};
@ -1162,17 +1162,6 @@ String GDScript::_get_gdscript_reference_class_name(const GDScript *p_gdscript)
GDScript::GDScript() :
script_list(this) {
valid = false;
subclass_count = 0;
initializer = nullptr;
_base = nullptr;
_owner = nullptr;
tool = false;
#ifdef TOOLS_ENABLED
source_changed_cache = false;
placeholder_fallback_enabled = false;
#endif
#ifdef DEBUG_ENABLED
{
MutexLock lock(GDScriptLanguage::get_singleton()->lock);