summaryrefslogtreecommitdiffstats
path: root/editor/project_converter_3_to_4.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-06-20 09:19:33 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-06-20 09:19:33 +0200
commit49dedd6ce48b14bff89f0683a19e5904af930701 (patch)
treef491e1429876c9f0f3e467c0a40b96966f9b8e6d /editor/project_converter_3_to_4.cpp
parent217a20a8a09bc305674bf3790c29cf2e8e257553 (diff)
parent4aecba68e347a31943dd864a5cb4b8628f351665 (diff)
downloadredot-engine-49dedd6ce48b14bff89f0683a19e5904af930701.tar.gz
Merge pull request #74567 from Garym3/3-to-4-converter-brace-aggregate-fix
Fix braces handling when parsing method arguments on project conversion
Diffstat (limited to 'editor/project_converter_3_to_4.cpp')
-rw-r--r--editor/project_converter_3_to_4.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/editor/project_converter_3_to_4.cpp b/editor/project_converter_3_to_4.cpp
index c5c2c9db51..9008b6a600 100644
--- a/editor/project_converter_3_to_4.cpp
+++ b/editor/project_converter_3_to_4.cpp
@@ -1274,14 +1274,17 @@ Vector<String> ProjectConverter3To4::parse_arguments(const String &line) {
for (int current_index = 0; current_index < string_size; current_index++) {
char32_t character = line.get(current_index);
switch (character) {
- case '(': {
+ case '(':
+ case '[':
+ case '{': {
parts_counter++;
if (parts_counter == 1 && !is_inside_string) {
start_part = current_index;
}
break;
};
- case ')': {
+ case ')':
+ case '}': {
parts_counter--;
if (parts_counter == 0 && !is_inside_string) {
parts.append(line.substr(start_part + 1, current_index - start_part - 1));
@@ -1289,13 +1292,6 @@ Vector<String> ProjectConverter3To4::parse_arguments(const String &line) {
}
break;
};
- case '[': {
- parts_counter++;
- if (parts_counter == 1 && !is_inside_string) {
- start_part = current_index;
- }
- break;
- };
case ']': {
parts_counter--;
if (parts_counter == 0 && !is_inside_string) {