Skip to content

Commit bb59def

Browse files
committed
Merge pull request #78097 from brno32/remove-assert-from-project-converter
Remove `assert` conversion from the project converter
2 parents b02dd1c + d053536 commit bb59def

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

editor/project_converter_3_to_4.cpp

-15
Original file line numberDiff line numberDiff line change
@@ -946,10 +946,6 @@ bool ProjectConverter3To4::test_conversion(RegExContainer &reg_container) {
946946
valid = valid && test_conversion_gdscript_builtin("func _init(a: int).(d,e,f) -> void:", "func _init(a: int) -> void:\n\tsuper(d,e,f)", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
947947
valid = valid && test_conversion_gdscript_builtin("q_PackedDataContainer._iter_init(variable1)", "q_PackedDataContainer._iter_init(variable1)", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
948948

949-
valid = valid && test_conversion_gdscript_builtin("assert(speed < 20, str(randi()%10))", "assert(speed < 20) #,str(randi()%10))", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
950-
valid = valid && test_conversion_gdscript_builtin("assert(speed < 2)", "assert(speed < 2)", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
951-
valid = valid && test_conversion_gdscript_builtin("assert(false, \"Missing type --\" + str(argument.type) + \"--, needs to be added to project\")", "assert(false) #,\"Missing type --\" + str(argument.type) + \"--, needs to be added to project\")", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
952-
953949
valid = valid && test_conversion_gdscript_builtin("create_from_image(aa, bb)", "create_from_image(aa) #,bb", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
954950
valid = valid && test_conversion_gdscript_builtin("q_ImageTexture.create_from_image(variable1, variable2)", "q_ImageTexture.create_from_image(variable1) #,variable2", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
955951

@@ -2037,17 +2033,6 @@ void ProjectConverter3To4::process_gdscript_line(String &line, const RegExContai
20372033
}
20382034
}
20392035

2040-
// assert(speed < 20, str(randi()%10)) -> assert(speed < 20) #,str(randi()%10)) GDScript - GDScript bug constant message
2041-
if (line.contains("assert(")) {
2042-
int start = line.find("assert(");
2043-
int end = get_end_parenthesis(line.substr(start)) + 1;
2044-
if (end > -1) {
2045-
Vector<String> parts = parse_arguments(line.substr(start, end));
2046-
if (parts.size() == 2) {
2047-
line = line.substr(0, start) + "assert(" + parts[0] + ") " + line.substr(end + start) + "#," + parts[1] + ")";
2048-
}
2049-
}
2050-
}
20512036
// create_from_image(aa, bb) -> create_from_image(aa) #, bb ImageTexture
20522037
if (line.contains("create_from_image(")) {
20532038
int start = line.find("create_from_image(");

0 commit comments

Comments
 (0)