diff options
author | Anilforextra <anilforextra@gmail.com> | 2022-02-03 21:48:38 +0545 |
---|---|---|
committer | Anilforextra <anilforextra@gmail.com> | 2022-02-04 01:28:02 +0545 |
commit | adbe948bda202209b55249198e1837324e703ddb (patch) | |
tree | a7f424318e1d944e0564edb6fc55e8eabf266bd0 /editor/plugins/script_editor_plugin.cpp | |
parent | bf12719ccabcea9bf9b274f77511e02581678774 (diff) |
String: Add contains().
Diffstat (limited to 'editor/plugins/script_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 9e46150813..914b548372 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -159,7 +159,7 @@ void EditorStandardSyntaxHighlighter::_update_cache() { if (E.usage & PROPERTY_USAGE_CATEGORY || E.usage & PROPERTY_USAGE_GROUP || E.usage & PROPERTY_USAGE_SUBGROUP) { continue; } - if (name.find("/") != -1) { + if (name.contains("/")) { continue; } highlighter->add_member_keyword_color(name, member_variable_color); @@ -714,7 +714,7 @@ void ScriptEditor::_open_recent_script(int p_idx) { return; } // if it's a path then it's most likely a deleted file not help - } else if (path.find("::") != -1) { + } else if (path.contains("::")) { // built-in script String res_path = path.get_slice("::", 0); if (ResourceLoader::get_resource_type(res_path) == "PackedScene") { @@ -2292,7 +2292,7 @@ bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_gra } else if (flags[i] == '\0' || (!inside_quotes && flags[i] == ' ')) { String arg = flags.substr(from, num_chars); - if (arg.find("{file}") != -1) { + if (arg.contains("{file}")) { has_file_flag = true; } |