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

Add const references detected by clang-tidy

This commit is contained in:
Wilson E. Alvarez
2023-11-18 17:40:56 -05:00
parent 2d0ee20ff3
commit a3cb1b096f
57 changed files with 120 additions and 120 deletions

View File

@@ -410,7 +410,7 @@ Key find_keycode(const String &p_codestr) {
return keycode;
}
String last_part = code_parts[code_parts.size() - 1];
const String &last_part = code_parts[code_parts.size() - 1];
const _KeyCodeText *kct = &_keycodes[0];
while (kct->text) {
@@ -422,7 +422,7 @@ Key find_keycode(const String &p_codestr) {
}
for (int part = 0; part < code_parts.size() - 1; part++) {
String code_part = code_parts[part];
const String &code_part = code_parts[part];
if (code_part.nocasecmp_to(find_keycode_name(Key::SHIFT)) == 0) {
keycode |= KeyModifierMask::SHIFT;
} else if (code_part.nocasecmp_to(find_keycode_name(Key::CTRL)) == 0) {