diff options
Diffstat (limited to 'modules/gdscript/editor')
-rw-r--r-- | modules/gdscript/editor/gdscript_docgen.cpp | 2 | ||||
-rw-r--r-- | modules/gdscript/editor/gdscript_highlighter.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/gdscript/editor/gdscript_docgen.cpp b/modules/gdscript/editor/gdscript_docgen.cpp index 758887a723..3a5a88d356 100644 --- a/modules/gdscript/editor/gdscript_docgen.cpp +++ b/modules/gdscript/editor/gdscript_docgen.cpp @@ -140,7 +140,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 0b12f2ff76..629581bd6c 100644 --- a/modules/gdscript/editor/gdscript_highlighter.cpp +++ b/modules/gdscript/editor/gdscript_highlighter.cpp @@ -163,7 +163,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; } } @@ -236,7 +236,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; } } |