From eb335f51ca15774330219a9c65778db39cdebac1 Mon Sep 17 00:00:00 2001
From: Lioncash <mathew1800@gmail.com>
Date: Mon, 18 Mar 2019 11:32:49 -0400
Subject: input_common/sdl: Correct return values within implementations of
 GetPollers()

In both cases, we weren't actually returning anything, which is
undefined behavior.
---
 src/input_common/sdl/sdl_impl.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'src/input_common/sdl/sdl_impl.cpp')

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
-- 
cgit v1.2.3-70-g09d2