Delete dead EmulatedController::find_controller method

This commit is contained in:
Jonathan Mohrbacher 2023-02-25 10:20:23 -05:00 committed by Exzap
parent 4c697d3755
commit 44c16e1c64
2 changed files with 1 additions and 12 deletions

View File

@ -207,16 +207,6 @@ glm::vec2 EmulatedController::get_prev_position() const
return {};
}
std::shared_ptr<ControllerBase> EmulatedController::find_controller(std::string_view uuid, InputAPI::Type type) const
{
std::scoped_lock lock(m_mutex);
const auto it = std::find_if(m_controllers.cbegin(), m_controllers.cend(), [uuid, type](const auto& c) { return c->api() == type && c->uuid() == uuid; });
if (it != m_controllers.cend())
return *it;
return {};
}
void EmulatedController::add_controller(std::shared_ptr<ControllerBase> controller)
{
controller->connect();

View File

@ -68,7 +68,6 @@ public:
glm::vec2 get_position() const;
glm::vec2 get_prev_position() const;
std::shared_ptr<ControllerBase> find_controller(std::string_view uuid, InputAPI::Type type) const;
void add_controller(std::shared_ptr<ControllerBase> controller);
void remove_controller(const std::shared_ptr<ControllerBase>& controller);
void clear_controllers();