Merge pull request #4895 from lioncash/const

ControllerEmu: Add const to UpdateReferences() first reference parameter
This commit is contained in:
JosJuice
2017-02-11 09:27:37 +01:00
committed by GitHub
4 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@ std::unique_lock<std::recursive_mutex> EmulatedController::GetStateLock()
return lock;
}
void EmulatedController::UpdateReferences(ControllerInterface& devi)
void EmulatedController::UpdateReferences(const ControllerInterface& devi)
{
const auto lock = GetStateLock();
for (auto& ctrlGroup : groups)

View File

@ -33,7 +33,7 @@ public:
virtual void SaveConfig(IniFile::Section* sec, const std::string& base = "");
void UpdateDefaultDevice();
void UpdateReferences(ControllerInterface& devi);
void UpdateReferences(const ControllerInterface& devi);
// This returns a lock that should be held before calling State() on any control
// references and GetState(), by extension. This prevents a race condition