aboutsummaryrefslogtreecommitdiff
path: root/src/input_common/drivers/sdl_driver.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2021-12-13 09:05:23 -0500
committerLioncash <mathew1800@gmail.com>2021-12-13 09:05:50 -0500
commit2b92d22bda767c7c723935c357bea474f8e2d2f8 (patch)
treee732bb3b2062562c031ea54937514ca34ab6e6b1 /src/input_common/drivers/sdl_driver.cpp
parent9a104e2b60a764efece235b45c805059a39df357 (diff)
input_engine: std::move engine name where applicable
We can allow the name to be moved into, allowing allocations to be avoided.
Diffstat (limited to 'src/input_common/drivers/sdl_driver.cpp')
-rw-r--r--src/input_common/drivers/sdl_driver.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/input_common/drivers/sdl_driver.cpp b/src/input_common/drivers/sdl_driver.cpp
index 1052ed3946..1bae6cdc85 100644
--- a/src/input_common/drivers/sdl_driver.cpp
+++ b/src/input_common/drivers/sdl_driver.cpp
@@ -387,7 +387,7 @@ void SDLDriver::CloseJoysticks() {
joystick_map.clear();
}
-SDLDriver::SDLDriver(const std::string& input_engine_) : InputEngine(input_engine_) {
+SDLDriver::SDLDriver(std::string input_engine_) : InputEngine(std::move(input_engine_)) {
if (!Settings::values.enable_raw_input) {
// Disable raw input. When enabled this setting causes SDL to die when a web applet opens
SDL_SetHint(SDL_HINT_JOYSTICK_RAWINPUT, "0");