Fix compiler 'enumeral and non-enumeral type in conditional
expression' warning.
Rewrite the ForgetHistory function to use a more explicit test of
whether or not local variables have been set.
---
mythtv/libs/libmyth/recordingtypes.h | 2 ++
mythtv/libs/libmythtv/recordinginfo.cpp | 9 +++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/mythtv/libs/libmyth/recordingtypes.h b/mythtv/libs/libmyth/recordingtypes.h
index 5f3166f..eca7f44 100644
a
|
b
|
MPUBLIC int RecTypePrecedence(RecordingType rectype); |
41 | 41 | |
42 | 42 | typedef enum RecordingDupInTypes |
43 | 43 | { |
| 44 | kDupsUnset = 0x00, |
44 | 45 | kDupsInRecorded = 0x01, |
45 | 46 | kDupsInOldRecorded = 0x02, |
46 | 47 | kDupsInAll = 0x0F, |
… |
… |
MPUBLIC RecordingDupInType dupInFromString(QString); |
53 | 54 | |
54 | 55 | typedef enum RecordingDupMethodType |
55 | 56 | { |
| 57 | kDupCheckUnset = 0x00, |
56 | 58 | kDupCheckNone = 0x01, |
57 | 59 | kDupCheckSub = 0x02, |
58 | 60 | kDupCheckDesc = 0x04, |
diff --git a/mythtv/libs/libmythtv/recordinginfo.cpp b/mythtv/libs/libmythtv/recordinginfo.cpp
index 3a87da0..77cbac7 100644
a
|
b
|
void RecordingInfo::DeleteHistory(void) |
1343 | 1343 | void RecordingInfo::ForgetHistory(void) |
1344 | 1344 | { |
1345 | 1345 | uint erecid = parentid ? parentid : recordid; |
1346 | | uint din = dupin ? dupin : kDupsInAll; |
1347 | | uint dmeth = dupmethod ? dupmethod : kDupCheckSubThenDesc; |
| 1346 | uint din = dupin; |
| 1347 | uint dmeth = dupmethod; |
| 1348 | |
| 1349 | if (din == kDupsUnset) |
| 1350 | din = kDupsInAll; |
| 1351 | if (dmeth == kDupCheckUnset) |
| 1352 | dmeth = kDupCheckSubThenDesc; |
1348 | 1353 | |
1349 | 1354 | MSqlQuery result(MSqlQuery::InitCon()); |
1350 | 1355 | |