1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Use get_slicec instead of get_slice for single character splitters

This commit is contained in:
A Thousand Ships
2024-11-16 17:16:07 +01:00
parent b5bdb88062
commit 466590d0ec
58 changed files with 210 additions and 210 deletions

View File

@@ -158,7 +158,7 @@ void EditorPropertyFontMetaOverride::_notification(int p_what) {
void EditorPropertyFontMetaOverride::_property_changed(const String &p_property, const Variant &p_value, const String &p_name, bool p_changing) {
if (p_property.begins_with("keys")) {
Dictionary dict = object->get_dict();
String key = p_property.get_slice("/", 1);
String key = p_property.get_slicec('/', 1);
dict[key] = (bool)p_value;
emit_changed(get_edited_property(), dict, "", true);
@@ -378,7 +378,7 @@ EditorPropertyFontMetaOverride::EditorPropertyFontMetaOverride(bool p_script) {
void EditorPropertyOTVariation::_property_changed(const String &p_property, const Variant &p_value, const String &p_name, bool p_changing) {
if (p_property.begins_with("keys")) {
Dictionary dict = object->get_dict();
int key = p_property.get_slice("/", 1).to_int();
int key = p_property.get_slicec('/', 1).to_int();
dict[key] = (int)p_value;
emit_changed(get_edited_property(), dict, "", true);
@@ -561,7 +561,7 @@ void EditorPropertyOTFeatures::_notification(int p_what) {
void EditorPropertyOTFeatures::_property_changed(const String &p_property, const Variant &p_value, const String &p_name, bool p_changing) {
if (p_property.begins_with("keys")) {
Dictionary dict = object->get_dict();
int key = p_property.get_slice("/", 1).to_int();
int key = p_property.get_slicec('/', 1).to_int();
dict[key] = (int)p_value;
emit_changed(get_edited_property(), dict, "", true);