Use (r)find_char instead of (r)find for single characters

This commit is contained in:
A Thousand Ships 2024-11-16 18:52:15 +01:00
parent 5efd124ca1
commit 68f638cf02
No known key found for this signature in database
GPG key ID: 2033189A662F8BD7
70 changed files with 169 additions and 169 deletions

View file

@ -282,7 +282,7 @@ void ScriptTextEditor::_warning_clicked(const Variant &p_line) {
CodeEdit *text_editor = code_editor->get_text_editor();
String prev_line = line > 0 ? text_editor->get_line(line - 1) : "";
if (prev_line.contains("@warning_ignore")) {
const int closing_bracket_idx = prev_line.find(")");
const int closing_bracket_idx = prev_line.find_char(')');
const String text_to_insert = ", " + code.quote(quote_style);
text_editor->insert_text(text_to_insert, line - 1, closing_bracket_idx);
} else {
@ -1205,7 +1205,7 @@ void ScriptTextEditor::_update_connected_methods() {
// 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(".");
int pos = raw_name.rfind_char('.');
if (pos != -1) {
name = raw_name.substr(pos + 1);
}