diff options
-rw-r--r-- | editor/history_dock.cpp | 2 | ||||
-rw-r--r-- | modules/gdscript/gdscript_compiler.cpp | 1 | ||||
-rw-r--r-- | servers/rendering/shader_language.cpp | 20 |
3 files changed, 23 insertions, 0 deletions
diff --git a/editor/history_dock.cpp b/editor/history_dock.cpp index 57088a76cb..47b7e9f5d7 100644 --- a/editor/history_dock.cpp +++ b/editor/history_dock.cpp @@ -219,6 +219,8 @@ void HistoryDock::_notification(int p_notification) { } HistoryDock::HistoryDock() { + set_name("History"); + ur_manager = EditorNode::get_undo_redo(); ur_manager->connect("history_changed", callable_mp(this, &HistoryDock::on_history_changed)); ur_manager->connect("version_changed", callable_mp(this, &HistoryDock::on_version_changed)); diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index aa1356d8c0..824625b745 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -133,6 +133,7 @@ GDScriptDataType GDScriptCompiler::_gdtype_from_datatype(const GDScriptParser::D if (script.is_null()) { _set_error(vformat(R"(Could not find class "%s" in "%s".)", p_datatype.class_type->fqcn, p_datatype.script_path), nullptr); + return GDScriptDataType(); } else { // Only hold a strong reference if the owner of the element qualified with this type is not local, to avoid cyclic references (leaks). // TODO: Might lead to use after free if script_type is a subclass and is used after its parent is freed. diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp index 92e172494e..497e4476d0 100644 --- a/servers/rendering/shader_language.cpp +++ b/servers/rendering/shader_language.cpp @@ -4309,8 +4309,18 @@ ShaderLanguage::DataType ShaderLanguage::get_scalar_type(DataType p_type) { TYPE_INT, TYPE_UINT, TYPE_FLOAT, + TYPE_INT, + TYPE_UINT, + TYPE_FLOAT, + TYPE_INT, + TYPE_UINT, + TYPE_FLOAT, + TYPE_FLOAT, + TYPE_VOID, }; + static_assert(sizeof(scalar_types) / sizeof(*scalar_types) == TYPE_MAX); + return scalar_types[p_type]; } @@ -4340,8 +4350,18 @@ int ShaderLanguage::get_cardinality(DataType p_type) { 1, 1, 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, }; + static_assert(sizeof(cardinality_table) / sizeof(*cardinality_table) == TYPE_MAX); + return cardinality_table[p_type]; } |