You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Improve usage of String.split() vs get_slice()
This commit is contained in:
@@ -1756,8 +1756,7 @@ void Input::parse_mapping(const String &p_mapping) {
|
||||
void Input::add_joy_mapping(const String &p_mapping, bool p_update_existing) {
|
||||
parse_mapping(p_mapping);
|
||||
if (p_update_existing) {
|
||||
Vector<String> entry = p_mapping.split(",");
|
||||
const String &uid = entry[0];
|
||||
const String uid = p_mapping.get_slicec(',', 0);
|
||||
for (KeyValue<int, Joypad> &E : joy_names) {
|
||||
Joypad &joy = E.value;
|
||||
if (joy.uid == uid) {
|
||||
|
||||
Reference in New Issue
Block a user