Merge pull request #59747 from bruvzg/clang_san_fixes

This commit is contained in:
Rémi Verschelde 2022-03-31 18:47:49 +02:00 committed by GitHub
commit 1ed978574e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -214,7 +214,7 @@ public:
private: private:
PropertyInfo _gen_return_type_info() const { PropertyInfo _gen_return_type_info() const {
return reinterpret_cast<const Derived *>(this)->_gen_return_type_info_impl(); return Derived::_gen_return_type_info_impl();
} }
}; };
@ -237,7 +237,7 @@ public:
} }
private: private:
PropertyInfo _gen_return_type_info_impl() const { static PropertyInfo _gen_return_type_info_impl() {
return {}; return {};
} }
}; };
@ -267,7 +267,7 @@ public:
} }
private: private:
PropertyInfo _gen_return_type_info_impl() const { static PropertyInfo _gen_return_type_info_impl() {
return GetTypeInfo<R>::get_class_info(); return GetTypeInfo<R>::get_class_info();
} }
}; };

View File

@ -824,7 +824,7 @@ Error GDScript::reload(bool p_keep_state) {
// Loading a template, don't parse. // Loading a template, don't parse.
#ifdef TOOLS_ENABLED #ifdef TOOLS_ENABLED
if (basedir.begins_with(EditorSettings::get_singleton()->get_project_script_templates_dir())) { if (EditorSettings::get_singleton() && basedir.begins_with(EditorSettings::get_singleton()->get_project_script_templates_dir())) {
return OK; return OK;
} }
#endif #endif