Skip to content

Commit

Permalink
cppcheck: Collapse duplicate conditions into a single clause in recor…
Browse files Browse the repository at this point in the history
…ding rule.
  • Loading branch information
linuxdude42 committed Oct 2, 2020
1 parent 1550068 commit 516106c
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions mythtv/libs/libmythtv/recordingrule.cpp
Expand Up @@ -118,13 +118,12 @@ bool RecordingRule::Load(bool asTemplate)
m_autoUserJob4 = query.value(22).toBool();
m_autoMetadataLookup = query.value(23).toBool();

// Original rule id for override rule
if (!asTemplate)
{
// Original rule id for override rule
m_parentRecID = query.value(24).toInt();

// Recording metadata
if (!asTemplate)
{
// Recording metadata
m_title = query.value(25).toString();
m_subtitle = query.value(26).toString();
m_description = query.value(27).toString();
Expand All @@ -138,22 +137,16 @@ bool RecordingRule::Load(bool asTemplate)
m_seriesid = query.value(35).toString();
m_programid = query.value(36).toString();
m_inetref = query.value(37).toString();
}

// Associated data for rule types
if (!asTemplate)
{
// Associated data for rule types
m_channelid = query.value(38).toInt();
m_station = query.value(39).toString();
m_findday = query.value(40).toInt();
m_findtime = query.value(41).toTime();
m_findid = query.value(42).toInt();
}

// Statistic fields - Used to generate statistics about particular rules
// and influence watch list weighting
if (!asTemplate)
{
// Statistic fields - Used to generate statistics about particular rules
// and influence watch list weighting
m_nextRecording = MythDate::as_utc(query.value(43).toDateTime());
m_lastRecorded = MythDate::as_utc(query.value(44).toDateTime());
m_lastDeleted = MythDate::as_utc(query.value(45).toDateTime());
Expand Down

0 comments on commit 516106c

Please sign in to comment.