From f2787f620eebbbfb746f59cfbd0318210297061b Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Thu, 13 Nov 2014 00:55:14 -0800 Subject: ControllerInterface: Make UpdateInput / UpdateOutput return void The return values here have never been checked, so it doesn't make sense to return a value to begin with. --- .../ControllerInterface/ControllerInterface.cpp | 26 +++++----------------- 1 file changed, 6 insertions(+), 20 deletions(-) (limited to 'Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp') diff --git a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp index 95ce7e5d96..74aa6de3a3 100644 --- a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp +++ b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp @@ -135,22 +135,15 @@ void ControllerInterface::Shutdown() // // Update input for all devices, return true if all devices returned successful // -bool ControllerInterface::UpdateInput() +void ControllerInterface::UpdateInput() { std::unique_lock lk(update_lock, std::defer_lock); if (!lk.try_lock()) - return false; - - size_t ok_count = 0; + return; for (ciface::Core::Device* d : m_devices) - { - if (d->UpdateInput()) - ++ok_count; - } - - return (m_devices.size() == ok_count); + d->UpdateInput(); } // @@ -158,22 +151,15 @@ bool ControllerInterface::UpdateInput() // // Update output for all devices, return true if all devices returned successful // -bool ControllerInterface::UpdateOutput() +void ControllerInterface::UpdateOutput() { std::unique_lock lk(update_lock, std::defer_lock); if (!lk.try_lock()) - return false; - - size_t ok_count = 0; + return; for (ciface::Core::Device* d : m_devices) - { - if (d->UpdateOutput()) - ++ok_count; - } - - return (m_devices.size() == ok_count); + d->UpdateOutput(); } // -- cgit v1.2.3