diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/csg/csg_shape.cpp | 4 | ||||
-rw-r--r-- | modules/gdscript/gdscript_editor.cpp | 6 | ||||
-rw-r--r-- | modules/gdscript/gdscript_function.h | 10 | ||||
-rw-r--r-- | modules/gdscript/gdscript_parser.cpp | 19 | ||||
-rw-r--r-- | modules/webm/libvpx/SCsub | 4 |
5 files changed, 26 insertions, 17 deletions
diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp index 809fd841c1..a13f731c11 100644 --- a/modules/csg/csg_shape.cpp +++ b/modules/csg/csg_shape.cpp @@ -1132,9 +1132,9 @@ CSGBrush *CSGBox::_build_brush() { for (int k = 0; k < 3; k++) { if (i < 3) - face_points[j][(i + k) % 3] = v[k] * (i >= 3 ? -1 : 1); + face_points[j][(i + k) % 3] = v[k]; else - face_points[3 - j][(i + k) % 3] = v[k] * (i >= 3 ? -1 : 1); + face_points[3 - j][(i + k) % 3] = -v[k]; } } diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 64678c7240..08ad101967 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -1181,7 +1181,11 @@ static bool _guess_identifier_type(const GDScriptCompletionContext &p_context, c c.line = op->line; c.block = blk; if (_guess_expression_type(p_context, op->arguments[1], r_type)) { - r_type.type.is_meta_type = false; + r_type.type.is_meta_type = false; // Right-hand of `is` will be a meta type, but the left-hand value is not + // Not an assignment, it shouldn't carry any value + r_type.value = Variant(); + r_type.assigned_expression = NULL; + return true; } } diff --git a/modules/gdscript/gdscript_function.h b/modules/gdscript/gdscript_function.h index aab1af1250..f4058664ff 100644 --- a/modules/gdscript/gdscript_function.h +++ b/modules/gdscript/gdscript_function.h @@ -74,8 +74,14 @@ struct GDScriptDataType { return false; } Object *obj = p_variant.operator Object *(); - if (obj && !ClassDB::is_parent_class(obj->get_class_name(), native_type)) { - return false; + if (obj) { + if (!ClassDB::is_parent_class(obj->get_class_name(), native_type)) { + // Try with underscore prefix + StringName underscore_native_type = "_" + native_type; + if (!ClassDB::is_parent_class(obj->get_class_name(), underscore_native_type)) { + return false; + } + } } return true; } break; diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index c6c2e57ba5..1292e11209 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -6228,7 +6228,7 @@ GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) { if (check_types && index_type.has_type) { if (base_type.kind == DataType::BUILTIN) { // Check if indexing is valid - bool error = index_type.kind != DataType::BUILTIN; + bool error = index_type.kind != DataType::BUILTIN && base_type.builtin_type != Variant::DICTIONARY; if (!error) { switch (base_type.builtin_type) { // Expect int or real as index @@ -6771,10 +6771,10 @@ GDScriptParser::DataType GDScriptParser::_reduce_function_call_type(const Operat valid = _get_function_signature(base_type, callee_name, return_type, arg_types, default_args_count, is_static, is_vararg); - if (valid) { - return_type = original_type; - return_type.is_meta_type = false; - } + return_type = original_type; + return_type.is_meta_type = false; + + valid = true; // There's always an initializer, we can asume this is true } if (!valid) { @@ -6833,6 +6833,7 @@ GDScriptParser::DataType GDScriptParser::_reduce_function_call_type(const Operat } break; } +#ifdef DEBUG_ENABLED if (!check_types) { return return_type; } @@ -6858,11 +6859,9 @@ GDScriptParser::DataType GDScriptParser::_reduce_function_call_type(const Operat if (!par_type.has_type) { _mark_line_as_unsafe(p_call->line); -#ifdef DEBUG_ENABLED if (par_type.may_yield && p_call->arguments[i]->type == Node::TYPE_OPERATOR) { _add_warning(GDScriptWarning::FUNCTION_MAY_YIELD, p_call->line, _find_function_name(static_cast<OperatorNode *>(p_call->arguments[i]))); } -#endif // DEBUG_ENABLED } else if (!_is_type_compatible(arg_types[i - arg_diff], par_type, true)) { // Supertypes are acceptable for dynamic compliance if (!_is_type_compatible(par_type, arg_types[i - arg_diff])) { @@ -6875,14 +6874,14 @@ GDScriptParser::DataType GDScriptParser::_reduce_function_call_type(const Operat _mark_line_as_unsafe(p_call->line); } } else { -#ifdef DEBUG_ENABLED if (arg_type.kind == DataType::BUILTIN && arg_type.builtin_type == Variant::INT && par_type.kind == DataType::BUILTIN && par_type.builtin_type == Variant::REAL) { _add_warning(GDScriptWarning::NARROWING_CONVERSION, p_call->line, callee_name); } -#endif // DEBUG_ENABLED } } +#endif // DEBUG_ENABLED + return return_type; } @@ -8114,6 +8113,7 @@ Error GDScriptParser::_parse(const String &p_base_path) { check_types = false; #endif +#ifdef DEBUG_ENABLED // Resolve all class-level stuff before getting into function blocks _check_class_level_types(main_class); @@ -8128,7 +8128,6 @@ Error GDScriptParser::_parse(const String &p_base_path) { return ERR_PARSE_ERROR; } -#ifdef DEBUG_ENABLED // Resolve warning ignores Vector<Pair<int, String> > warning_skips = tokenizer->get_warning_skips(); bool warning_is_error = GLOBAL_GET("debug/gdscript/warnings/treat_warnings_as_errors").booleanize(); diff --git a/modules/webm/libvpx/SCsub b/modules/webm/libvpx/SCsub index df75dca310..2639d20620 100644 --- a/modules/webm/libvpx/SCsub +++ b/modules/webm/libvpx/SCsub @@ -272,9 +272,9 @@ else: import platform is_x11_or_server_arm = ((env["platform"] == 'x11' or env["platform"] == 'server') and (platform.machine().startswith('arm') or platform.machine().startswith('aarch'))) is_ios_x86 = (env["platform"] == 'iphone' and ("arch" in env and env["arch"].startswith('x86'))) - is_android_x86 = (env["platform"] == 'android' and env["android_arch"] == 'x86') + is_android_x86 = (env["platform"] == 'android' and env["android_arch"].startswith('x86')) if is_android_x86: - cpu_bits = '32' + cpu_bits = '32' if env["android_arch"] == 'x86' else '64' webm_cpu_x86 = not is_x11_or_server_arm and (cpu_bits == '32' or cpu_bits == '64') and (env["platform"] == 'windows' or env["platform"] == 'x11' or env["platform"] == 'osx' or env["platform"] == 'haiku' or is_android_x86 or is_ios_x86) webm_cpu_arm = is_x11_or_server_arm or (not is_ios_x86 and env["platform"] == 'iphone') or (not is_android_x86 and env["platform"] == 'android') |