Skip to content

Commit fcb0b8d

Browse files
committed
Refactor check for overriden methods in inner classes
1 parent 7d151c8 commit fcb0b8d

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

editor/plugins/script_text_editor.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,14 +1170,11 @@ void ScriptTextEditor::_update_connected_methods() {
11701170
continue;
11711171
}
11721172

1173-
// Account for inner classes
1174-
if (raw_name.contains(".")) {
1175-
// Strip inner class name from the method, and start from the right since
1176-
// our inner class might be inside another inner class
1177-
int pos = raw_name.rfind(".");
1178-
if (pos != -1) {
1179-
name = raw_name.substr(pos + 1);
1180-
}
1173+
// Account for inner classes by stripping the class names from the method,
1174+
// starting from the right since our inner class might be inside of another inner class.
1175+
int pos = raw_name.rfind(".");
1176+
if (pos != -1) {
1177+
name = raw_name.substr(pos + 1);
11811178
}
11821179

11831180
String found_base_class;

0 commit comments

Comments
 (0)