diff options
author | Lioncash <mathew1800@gmail.com> | 2021-12-13 09:05:23 -0500 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2021-12-13 09:05:50 -0500 |
commit | 2b92d22bda767c7c723935c357bea474f8e2d2f8 (patch) | |
tree | e732bb3b2062562c031ea54937514ca34ab6e6b1 /src/input_common/drivers/sdl_driver.h | |
parent | 9a104e2b60a764efece235b45c805059a39df357 (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.h')
-rw-r--r-- | src/input_common/drivers/sdl_driver.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/input_common/drivers/sdl_driver.h b/src/input_common/drivers/sdl_driver.h index d03ff4b84f..c6fffe3746 100644 --- a/src/input_common/drivers/sdl_driver.h +++ b/src/input_common/drivers/sdl_driver.h @@ -19,19 +19,19 @@ using SDL_GameController = struct _SDL_GameController; using SDL_Joystick = struct _SDL_Joystick; using SDL_JoystickID = s32; +namespace InputCommon { + +class SDLJoystick; + using ButtonBindings = std::array<std::pair<Settings::NativeButton::Values, SDL_GameControllerButton>, 17>; using ZButtonBindings = std::array<std::pair<Settings::NativeButton::Values, SDL_GameControllerAxis>, 2>; -namespace InputCommon { - -class SDLJoystick; - -class SDLDriver : public InputCommon::InputEngine { +class SDLDriver : public InputEngine { public: /// Initializes and registers SDL device factories - SDLDriver(const std::string& input_engine_); + explicit SDLDriver(std::string input_engine_); /// Unregisters SDL device factories and shut them down. ~SDLDriver() override; |