Skip to content

Commit

Permalink
tidy: Fix "argument looks like it might be swapped" in scheduler.
Browse files Browse the repository at this point in the history
Rename a variable in AddChildInput so that the paramaters are "parent"
and "child".

https://clang.llvm.org/extra/clang-tidy/checks/readability-suspicious-call-argument.html
  • Loading branch information
linuxdude42 committed Nov 6, 2021
1 parent 4c7701c commit 7625b74
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions mythtv/programs/mythbackend/scheduler.cpp
Expand Up @@ -5830,30 +5830,30 @@ bool Scheduler::InitInputInfoMap(void)
return CreateConflictLists();
}

void Scheduler::AddChildInput(uint parentid, uint inputid)
void Scheduler::AddChildInput(uint parentid, uint childid)
{
LOG(VB_SCHEDULE, LOG_INFO, LOC +
QString("AddChildInput: Handling parent = %1, input = %2")
.arg(parentid).arg(inputid));
.arg(parentid).arg(childid));

// This code should stay substantially similar to that above in
// InitInputInfoMap().
SchedInputInfo &siinfo = m_sinputInfoMap[inputid];
siinfo.m_inputId = inputid;
SchedInputInfo &siinfo = m_sinputInfoMap[childid];
siinfo.m_inputId = childid;
if (m_sinputInfoMap[parentid].m_schedGroup)
siinfo.m_sgroupId = parentid;
else
siinfo.m_sgroupId = inputid;
siinfo.m_sgroupId = childid;
siinfo.m_schedGroup = false;
siinfo.m_conflictingInputs = CardUtil::GetConflictingInputs(inputid);
siinfo.m_conflictingInputs = CardUtil::GetConflictingInputs(childid);

siinfo.m_conflictList = m_sinputInfoMap[parentid].m_conflictList;

// Now, fixup the infos for the parent and conflicting inputs.
m_sinputInfoMap[parentid].m_groupInputs.push_back(inputid);
m_sinputInfoMap[parentid].m_groupInputs.push_back(childid);
for (uint otherid : siinfo.m_conflictingInputs)
{
m_sinputInfoMap[otherid].m_conflictingInputs.push_back(inputid);
m_sinputInfoMap[otherid].m_conflictingInputs.push_back(childid);
}
}

Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythbackend/scheduler.h
Expand Up @@ -114,7 +114,7 @@ class Scheduler : public MThread, public MythScheduler

int GetError(void) const { return m_error; }

void AddChildInput(uint parentid, uint inputid);
void AddChildInput(uint parentid, uint childid);
void DelayShutdown();

protected:
Expand Down

0 comments on commit 7625b74

Please sign in to comment.