diff options
| author | George L. Albany <Megacake1234@gmail.com> | 2024-11-19 22:29:10 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-19 22:29:10 +0000 |
| commit | fd9045fe09e9bea691f0169c16d45cbebddb6bba (patch) | |
| tree | 148a5511d3c1d723b2f2f364c832c2ba6f267fcc /modules/gdscript | |
| parent | 9767837a7ec40697788765e581131cb2cf172567 (diff) | |
| parent | cfc378b251e4330c6b6be949d4c054f9bae48159 (diff) | |
| download | redot-engine-fd9045fe09e9bea691f0169c16d45cbebddb6bba.tar.gz | |
Merge pull request #873 from Spartan322/merge/fd4c29a
Merge commit godotengine/godot@fd4c29a
Diffstat (limited to 'modules/gdscript')
| -rw-r--r-- | modules/gdscript/editor/gdscript_docgen.cpp | 2 | ||||
| -rw-r--r-- | modules/gdscript/editor/gdscript_highlighter.cpp | 4 | ||||
| -rw-r--r-- | modules/gdscript/gdscript_editor.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/modules/gdscript/editor/gdscript_docgen.cpp b/modules/gdscript/editor/gdscript_docgen.cpp index 808ce6fff5..0d202b09ca 100644 --- a/modules/gdscript/editor/gdscript_docgen.cpp +++ b/modules/gdscript/editor/gdscript_docgen.cpp @@ -142,7 +142,7 @@ void GDScriptDocGen::_doctype_from_gdtype(const GDType &p_gdtype, String &r_type r_enum = String(p_gdtype.native_type).replace("::", "."); if (r_enum.begins_with("res://")) { r_enum = r_enum.trim_prefix("res://"); - int dot_pos = r_enum.rfind("."); + int dot_pos = r_enum.rfind_char('.'); if (dot_pos >= 0) { r_enum = r_enum.left(dot_pos).quote() + r_enum.substr(dot_pos); } diff --git a/modules/gdscript/editor/gdscript_highlighter.cpp b/modules/gdscript/editor/gdscript_highlighter.cpp index 6262b75f97..3856a64e9d 100644 --- a/modules/gdscript/editor/gdscript_highlighter.cpp +++ b/modules/gdscript/editor/gdscript_highlighter.cpp @@ -165,7 +165,7 @@ Dictionary GDScriptSyntaxHighlighter::_get_line_syntax_highlighting_impl(int p_l } if (from + end_key_length > line_length) { // If it's key length and there is a '\', dont skip to highlight esc chars. - if (str.find("\\", from) >= 0) { + if (str.find_char('\\', from) >= 0) { break; } } @@ -238,7 +238,7 @@ Dictionary GDScriptSyntaxHighlighter::_get_line_syntax_highlighting_impl(int p_l for (; from < line_length; from++) { if (line_length - from < end_key_length) { // Don't break if '\' to highlight esc chars. - if (str.find("\\", from) < 0) { + if (str.find_char('\\', from) < 0) { break; } } diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 3f17f9d80f..c3f091a2a3 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -3474,7 +3474,7 @@ static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, c } String arg = arg_itr->name; if (arg.contains(":")) { - arg = arg.substr(0, arg.find(":")); + arg = arg.substr(0, arg.find_char(':')); } method_hint += arg; if (use_type_hint) { |
