Skip to content

Commit

Permalink
Eliminate implicit bool->int casting in dtvsignalmonitor.cpp.
Browse files Browse the repository at this point in the history
The clang-tidy "implicit boolean conversion" check pointed out a
couple of implicit bool->integer conversions in the HandlePMT
function.  Rewrite two lines to eliminate the warning messages.

https://clang.llvm.org/extra/clang-tidy/checks/readability-implicit-bool-conversion.html
  • Loading branch information
linuxdude42 committed Apr 1, 2019
1 parent 4bbdf0c commit 7ec01cb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mythtv/libs/libmythtv/recorders/dtvsignalmonitor.cpp
Expand Up @@ -369,8 +369,10 @@ void DTVSignalMonitor::HandlePMT(uint /*program_num*/, const ProgramMapTable *pm

for (uint i = 0; i < pmt->StreamCount(); i++)
{
hasVideo += pmt->IsVideo(i, GetDTVChannel()->GetSIStandard());
hasAudio += pmt->IsAudio(i, GetDTVChannel()->GetSIStandard());
if (pmt->IsVideo(i, GetDTVChannel()->GetSIStandard()))
hasVideo++;
if (pmt->IsAudio(i, GetDTVChannel()->GetSIStandard()))
hasAudio++;
}

if ((hasVideo >= GetStreamData()->GetVideoStreamsRequired()) &&
Expand Down

0 comments on commit 7ec01cb

Please sign in to comment.