summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Drozd <drozdster@gmail.com>2024-03-26 20:54:14 +0100
committerAlex Drozd <drozdster@gmail.com>2024-03-26 22:14:57 +0100
commitfcb0b8d0bffffb6fd42cf94367f008c02c25940f (patch)
tree0552bae1df1e7cad75cc739a683286b4311498da
parent7d151c83811f8ac8873439826c16d88c83aba12f (diff)
downloadredot-engine-fcb0b8d0bffffb6fd42cf94367f008c02c25940f.tar.gz
Refactor check for overriden methods in inner classes
-rw-r--r--editor/plugins/script_text_editor.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 640c755ccf..0a6eacf11d 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -1170,14 +1170,11 @@ void ScriptTextEditor::_update_connected_methods() {
continue;
}
- // Account for inner classes
- if (raw_name.contains(".")) {
- // Strip inner class name from the method, and start from the right since
- // our inner class might be inside another inner class
- int pos = raw_name.rfind(".");
- if (pos != -1) {
- name = raw_name.substr(pos + 1);
- }
+ // Account for inner classes by stripping the class names from the method,
+ // starting from the right since our inner class might be inside of another inner class.
+ int pos = raw_name.rfind(".");
+ if (pos != -1) {
+ name = raw_name.substr(pos + 1);
}
String found_base_class;