Skip to content
Permalink
Browse files

ControllerInterface/Device: Make DetectInput() a const member function

This doesn't actually modify object instance state, so it can be made
const.
  • Loading branch information...
lioncash committed May 29, 2019
1 parent 27346fe commit 02634350500bd4e7b85425cae7bb43a050b5aee4
@@ -256,7 +256,7 @@ bool DeviceContainer::HasConnectedDevice(const DeviceQualifier& qualifier) const
// and also properly handles detection when using "FullAnalogSurface" inputs.
// Upon input, return the detected Device and Input, else return nullptrs
std::pair<std::shared_ptr<Device>, Device::Input*>
DeviceContainer::DetectInput(u32 wait_ms, const std::vector<std::string>& device_strings)
DeviceContainer::DetectInput(u32 wait_ms, const std::vector<std::string>& device_strings) const
{
struct InputState
{
@@ -188,7 +188,7 @@ class DeviceContainer
bool HasConnectedDevice(const DeviceQualifier& qualifier) const;

std::pair<std::shared_ptr<Device>, Device::Input*>
DetectInput(u32 wait_ms, const std::vector<std::string>& device_strings);
DetectInput(u32 wait_ms, const std::vector<std::string>& device_strings) const;

protected:
mutable std::mutex m_devices_mutex;

0 comments on commit 0263435

Please sign in to comment.
You can’t perform that action at this time.