1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

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
70 changed files with 169 additions and 169 deletions

View File

@@ -160,13 +160,13 @@ bool CreateDialog::_should_hide_type(const StringName &p_type) const {
String script_path = ScriptServer::get_global_class_path(p_type);
if (script_path.begins_with("res://addons/")) {
int i = script_path.find("/", 13); // 13 is length of "res://addons/".
int i = script_path.find_char('/', 13); // 13 is length of "res://addons/".
while (i > -1) {
const String plugin_path = script_path.substr(0, i).path_join("plugin.cfg");
if (FileAccess::exists(plugin_path)) {
return !EditorNode::get_singleton()->is_addon_plugin_enabled(plugin_path);
}
i = script_path.find("/", i + 1);
i = script_path.find_char('/', i + 1);
}
}
}