diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/input_common/drivers/tas_input.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input_common/drivers/tas_input.cpp b/src/input_common/drivers/tas_input.cpp index 1617ba1d4..2094c1feb 100644 --- a/src/input_common/drivers/tas_input.cpp +++ b/src/input_common/drivers/tas_input.cpp | |||
| @@ -244,7 +244,7 @@ u64 Tas::ReadCommandButtons(const std::string& line) const { | |||
| 244 | std::string button_line; | 244 | std::string button_line; |
| 245 | u64 buttons = 0; | 245 | u64 buttons = 0; |
| 246 | while (std::getline(button_text, button_line, ';')) { | 246 | while (std::getline(button_text, button_line, ';')) { |
| 247 | for (auto [text, tas_button] : text_to_tas_button) { | 247 | for (const auto& [text, tas_button] : text_to_tas_button) { |
| 248 | if (text == button_line) { | 248 | if (text == button_line) { |
| 249 | buttons |= static_cast<u64>(tas_button); | 249 | buttons |= static_cast<u64>(tas_button); |
| 250 | break; | 250 | break; |
| @@ -256,7 +256,7 @@ u64 Tas::ReadCommandButtons(const std::string& line) const { | |||
| 256 | 256 | ||
| 257 | std::string Tas::WriteCommandButtons(u64 buttons) const { | 257 | std::string Tas::WriteCommandButtons(u64 buttons) const { |
| 258 | std::string returns; | 258 | std::string returns; |
| 259 | for (auto [text_button, tas_button] : text_to_tas_button) { | 259 | for (const auto& [text_button, tas_button] : text_to_tas_button) { |
| 260 | if ((buttons & static_cast<u64>(tas_button)) != 0) { | 260 | if ((buttons & static_cast<u64>(tas_button)) != 0) { |
| 261 | returns += fmt::format("{};", text_button); | 261 | returns += fmt::format("{};", text_button); |
| 262 | } | 262 | } |