Skip to content

Commit

Permalink
controllers/controllerengine: Disable DEBUG_ASSERT on invalid key
Browse files Browse the repository at this point in the history
  • Loading branch information
Holzhaus committed Aug 30, 2020
1 parent 994957d commit fd5c640
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/controllers/controllerengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1447,9 +1447,12 @@ bool ControllerEngine::isScratching(int deck) {
Output: -
-------- ------------------------------------------------------ */
void ControllerEngine::softTakeover(QString group, QString name, bool set) {
ConfigKey key = ConfigKey(group, name);
ControlObject* pControl = ControlObject::getControl(
ConfigKey(group, name), ControlFlag::NoAssertIfMissing);
key, ControlFlag::AllowInvalidKey | ControlFlag::NoAssertIfMissing);
if (!pControl) {
qWarning() << "Failed to" << (set ? "enable" : "disable")
<< "softTakeover for invalid control" << key;
return;
}
if (set) {
Expand All @@ -1470,9 +1473,11 @@ void ControllerEngine::softTakeover(QString group, QString name, bool set) {
-------- ------------------------------------------------------ */
void ControllerEngine::softTakeoverIgnoreNextValue(
QString group, const QString name) {
ConfigKey key = ConfigKey(group, name);
ControlObject* pControl = ControlObject::getControl(
ConfigKey(group, name), ControlFlag::NoAssertIfMissing);
key, ControlFlag::AllowInvalidKey | ControlFlag::NoAssertIfMissing);
if (!pControl) {
qWarning() << "Failed to call softTakeoverIgnoreNextValue for invalid control" << key;
return;
}

Expand Down

0 comments on commit fd5c640

Please sign in to comment.