Skip to content

Commit

Permalink
Rename RecTypePriority to RecTypePrecedence.
Browse files Browse the repository at this point in the history
This is to avoid confusion with the other scheduling related
priorities.
  • Loading branch information
gigem committed Nov 28, 2012
1 parent 33d80a9 commit 4b059d3
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion mythtv/libs/libmyth/recordingtypes.cpp
Expand Up @@ -4,7 +4,7 @@

/// Converts a RecordingType to a simple integer so it's specificity can
/// be compared to another. Lower number means more specific.
int RecTypePriority(RecordingType rectype)
int RecTypePrecedence(RecordingType rectype)
{
switch (rectype)
{
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmyth/recordingtypes.h
Expand Up @@ -36,7 +36,7 @@ MPUBLIC QString toRawString(RecordingType);
MPUBLIC QChar toQChar( RecordingType);
MPUBLIC RecordingType recTypeFromString(QString);

MPUBLIC int RecTypePriority(RecordingType rectype);
MPUBLIC int RecTypePrecedence(RecordingType rectype);

typedef enum RecordingDupInTypes
{
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/mythversion.h
Expand Up @@ -12,7 +12,7 @@
/// Update this whenever the plug-in API changes.
/// Including changes in the libmythbase, libmyth, libmythtv, libmythav* and
/// libmythui class methods used by plug-ins.
#define MYTH_BINARY_VERSION "0.27.20121127-1"
#define MYTH_BINARY_VERSION "0.27.20121128-1"

/** \brief Increment this whenever the MythTV network protocol changes.
*
Expand Down
20 changes: 10 additions & 10 deletions mythtv/programs/mythbackend/scheduler.cpp
Expand Up @@ -253,20 +253,20 @@ static bool comp_overlap(RecordingInfo *a, RecordingInfo *b)
// won't record except for those from kDontRecord rules. This
// will force them to yield to a rule that might record.
// Otherwise, more specific record type beats less specific.
int apri = RecTypePriority(a->GetRecordingRuleType());
int aprec = RecTypePrecedence(a->GetRecordingRuleType());
if (a->GetRecordingStatus() != rsUnknown &&
a->GetRecordingStatus() != rsDontRecord)
{
apri += 100;
aprec += 100;
}
int bpri = RecTypePriority(b->GetRecordingRuleType());
int bprec = RecTypePrecedence(b->GetRecordingRuleType());
if (b->GetRecordingStatus() != rsUnknown &&
b->GetRecordingStatus() != rsDontRecord)
{
bpri += 100;
bprec += 100;
}
if (apri != bpri)
return apri < bpri;
if (aprec != bprec)
return aprec < bprec;

if (a->GetFindID() != b->GetFindID())
return a->GetFindID() > b->GetFindID();
Expand Down Expand Up @@ -335,11 +335,11 @@ static bool comp_priority(RecordingInfo *a, RecordingInfo *b)
if (apast != bpast)
return apast < bpast;

int apri = RecTypePriority(a->GetRecordingRuleType());
int bpri = RecTypePriority(b->GetRecordingRuleType());
int aprec = RecTypePrecedence(a->GetRecordingRuleType());
int bprec = RecTypePrecedence(b->GetRecordingRuleType());

if (apri != bpri)
return apri < bpri;
if (aprec != bprec)
return aprec < bprec;

if (a->GetRecordingStartTime() != b->GetRecordingStartTime())
{
Expand Down
12 changes: 6 additions & 6 deletions mythtv/programs/mythfrontend/programrecpriority.cpp
Expand Up @@ -156,8 +156,8 @@ class TitleSort
return finalA > finalB;
}

int typeA = RecTypePriority(a->recType);
int typeB = RecTypePriority(b->recType);
int typeA = RecTypePrecedence(a->recType);
int typeB = RecTypePrecedence(b->recType);

if (typeA != typeB)
{
Expand Down Expand Up @@ -200,8 +200,8 @@ class ProgramRecPrioritySort
return finalA > finalB;
}

int typeA = RecTypePriority(a->recType);
int typeB = RecTypePriority(b->recType);
int typeA = RecTypePrecedence(a->recType);
int typeB = RecTypePrecedence(b->recType);

if (typeA != typeB)
{
Expand Down Expand Up @@ -231,8 +231,8 @@ class ProgramRecTypeSort
bool operator()(const ProgramRecPriorityInfo *a,
const ProgramRecPriorityInfo *b) const
{
int typeA = RecTypePriority(a->recType);
int typeB = RecTypePriority(b->recType);
int typeA = RecTypePrecedence(a->recType);
int typeB = RecTypePrecedence(b->recType);

if (typeA != typeB)
{
Expand Down

0 comments on commit 4b059d3

Please sign in to comment.