diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-28 10:47:28 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-28 10:47:28 +0100 |
commit | 669fc368acdb5f6caf9ec788b215c2a09060bf20 (patch) | |
tree | 2c45b9c7d8a8584d912d1933be47081cbb937725 /editor/plugins/script_text_editor.cpp | |
parent | b23d7c36456a8a26dfe120c226acad93fd89500b (diff) | |
parent | fcb0b8d0bffffb6fd42cf94367f008c02c25940f (diff) | |
download | redot-engine-669fc368acdb5f6caf9ec788b215c2a09060bf20.tar.gz |
Merge pull request #89922 from brno32/override-gutter-icon-inner-class-method
Refactor check for overriden methods in inner classes
Diffstat (limited to 'editor/plugins/script_text_editor.cpp')
-rw-r--r-- | editor/plugins/script_text_editor.cpp | 13 |
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; |