You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Use (r)find_char instead of (r)find for single characters
This commit is contained in:
@@ -148,7 +148,7 @@ static String _contextualize_class_specifier(const String &p_class_specifier, co
|
||||
|
||||
// Here equal length + begins_with from above implies p_class_specifier == p_edited_class :)
|
||||
if (p_class_specifier.length() == p_edited_class.length()) {
|
||||
int rfind = p_class_specifier.rfind(".");
|
||||
int rfind = p_class_specifier.rfind_char('.');
|
||||
if (rfind == -1) { // Single identifier
|
||||
return p_class_specifier;
|
||||
}
|
||||
@@ -234,7 +234,7 @@ void EditorHelp::_class_desc_select(const String &p_select) {
|
||||
enum_class_name = "@GlobalScope";
|
||||
enum_name = link;
|
||||
} else {
|
||||
const int dot_pos = link.rfind(".");
|
||||
const int dot_pos = link.rfind_char('.');
|
||||
if (dot_pos >= 0) {
|
||||
enum_class_name = link.left(dot_pos);
|
||||
enum_name = link.substr(dot_pos + 1);
|
||||
@@ -3252,7 +3252,7 @@ EditorHelpBit::HelpData EditorHelpBit::_get_property_help_data(const StringName
|
||||
enum_class_name = "@GlobalScope";
|
||||
enum_name = property.enumeration;
|
||||
} else {
|
||||
const int dot_pos = property.enumeration.rfind(".");
|
||||
const int dot_pos = property.enumeration.rfind_char('.');
|
||||
if (dot_pos >= 0) {
|
||||
enum_class_name = property.enumeration.left(dot_pos);
|
||||
enum_name = property.enumeration.substr(dot_pos + 1);
|
||||
@@ -3619,7 +3619,7 @@ void EditorHelpBit::_meta_clicked(const String &p_select) {
|
||||
enum_class_name = "@GlobalScope";
|
||||
enum_name = link;
|
||||
} else {
|
||||
const int dot_pos = link.rfind(".");
|
||||
const int dot_pos = link.rfind_char('.');
|
||||
if (dot_pos >= 0) {
|
||||
enum_class_name = link.left(dot_pos);
|
||||
enum_name = link.substr(dot_pos + 1);
|
||||
|
||||
Reference in New Issue
Block a user