diff options
author | bunnei <bunneidev@gmail.com> | 2019-03-21 00:20:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-21 00:20:49 -0400 |
commit | 839c0f829b109da8e7c69fe17dd5b054b54a12ac (patch) | |
tree | 9b073f88df08681710d89ebd46de1c1b2d79e47a /src/input_common/sdl/sdl_impl.cpp | |
parent | 109b78a6d6c42a665ce9a86a2aca4166eadb0957 (diff) | |
parent | eb335f51ca15774330219a9c65778db39cdebac1 (diff) |
Merge pull request #2260 from lioncash/sdl
input_common/sdl: Correct return values within GetPollers implementations
Diffstat (limited to 'src/input_common/sdl/sdl_impl.cpp')
-rw-r--r-- | src/input_common/sdl/sdl_impl.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp index 6e8376549..b132d77f5 100644 --- a/src/input_common/sdl/sdl_impl.cpp +++ b/src/input_common/sdl/sdl_impl.cpp @@ -650,9 +650,9 @@ private: }; } // namespace Polling -std::vector<std::unique_ptr<InputCommon::Polling::DevicePoller>> SDLState::GetPollers( - InputCommon::Polling::DeviceType type) { - std::vector<std::unique_ptr<InputCommon::Polling::DevicePoller>> pollers; +SDLState::Pollers SDLState::GetPollers(InputCommon::Polling::DeviceType type) { + Pollers pollers; + switch (type) { case InputCommon::Polling::DeviceType::Analog: pollers.emplace_back(std::make_unique<Polling::SDLAnalogPoller>(*this)); @@ -660,8 +660,9 @@ std::vector<std::unique_ptr<InputCommon::Polling::DevicePoller>> SDLState::GetPo case InputCommon::Polling::DeviceType::Button: pollers.emplace_back(std::make_unique<Polling::SDLButtonPoller>(*this)); break; - return pollers; } + + return pollers; } } // namespace SDL |