diff options
| author | Lioncash <mathew1800@gmail.com> | 2019-03-18 11:32:49 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2019-03-18 11:40:38 -0400 |
| commit | 54150dcb73192a63b454eabdd8e8cc5dd7b684d4 (patch) | |
| tree | 80b2280dbfadad42b685f7e9eda7ef8bd479b689 /src/input_common/sdl/sdl_impl.cpp | |
| parent | ae7b53779257c154035c64a77509f359a4550193 (diff) | |
input_common/sdl: Correct return values within implementations of GetPollers()
In both cases, we weren't actually returning anything, which is
undefined behavior.
Diffstat (limited to 'src/input_common/sdl/sdl_impl.cpp')
| -rw-r--r-- | src/input_common/sdl/sdl_impl.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp index f44a4a3321..b132d77f5d 100644 --- a/src/input_common/sdl/sdl_impl.cpp +++ b/src/input_common/sdl/sdl_impl.cpp @@ -652,6 +652,7 @@ private: 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)); @@ -659,8 +660,9 @@ SDLState::Pollers SDLState::GetPollers(InputCommon::Polling::DeviceType type) { case InputCommon::Polling::DeviceType::Button: pollers.emplace_back(std::make_unique<Polling::SDLButtonPoller>(*this)); break; - return pollers; } + + return pollers; } } // namespace SDL |
