InputDeviceManager::FindDevice uses const string&

This commit is contained in:
darkf 2020-04-06 01:11:37 -07:00
parent 5502d84057
commit 1091bee10e
2 changed files with 2 additions and 2 deletions

View File

@ -473,7 +473,7 @@ std::vector<std::string> InputDeviceManager::GetDeviceList() const
return dev_list; return dev_list;
} }
std::shared_ptr<InputDevice> InputDeviceManager::FindDevice(std::string& QualifiedName) const std::shared_ptr<InputDevice> InputDeviceManager::FindDevice(const std::string& QualifiedName) const
{ {
std::lock_guard<std::mutex> lck(m_Mtx); std::lock_guard<std::mutex> lck(m_Mtx);

View File

@ -74,7 +74,7 @@ public:
// get the name of the devices currently detected // get the name of the devices currently detected
std::vector<std::string> GetDeviceList() const; std::vector<std::string> GetDeviceList() const;
// find device from its gui name // find device from its gui name
std::shared_ptr<InputDevice> FindDevice(std::string& QualifiedName) const; std::shared_ptr<InputDevice> FindDevice(const std::string& QualifiedName) const;
// find device from its sdl id // find device from its sdl id
std::shared_ptr<InputDevice> FindDevice(SDL_JoystickID id) const; std::shared_ptr<InputDevice> FindDevice(SDL_JoystickID id) const;
// find device from its xbox port // find device from its xbox port