Skip to content

Commit

Permalink
Merge pull request #4895 from lioncash/const
Browse files Browse the repository at this point in the history
ControllerEmu: Add const to UpdateReferences() first reference parameter
  • Loading branch information
JosJuice committed Feb 11, 2017
2 parents e568d57 + 98145d2 commit d19aabb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ bool ControlReference::InputGateOn()
// Updates a controlreference's binded devices/controls
// need to call this to re-parse a control reference's expression after changing it
//
void ControlReference::UpdateReference(ciface::Core::DeviceContainer& devices,
void ControlReference::UpdateReference(const ciface::Core::DeviceContainer& devices,
const ciface::Core::DeviceQualifier& default_device)
{
Expression* expr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ControlReference

int BoundCount() const;
ciface::ExpressionParser::ExpressionParseStatus GetParseStatus() const;
void UpdateReference(ciface::Core::DeviceContainer& devices,
void UpdateReference(const ciface::Core::DeviceContainer& devices,
const ciface::Core::DeviceQualifier& default_device);

ControlState range;
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/InputCommon/ControllerEmu/ControllerEmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class EmulatedController
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
Expand Down

0 comments on commit d19aabb

Please sign in to comment.