Skip to content

Commit

Permalink
Replace "(uint)-1" with "UINT_MAX".
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxdude42 committed Dec 3, 2019
1 parent 2916f55 commit 4b82e6b
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion mythtv/libs/libmyth/programinfo.cpp
Expand Up @@ -47,7 +47,7 @@ ProgramInfoUpdater *ProgramInfo::s_updater;
int force_init = pginfo_init_statics();
bool ProgramInfo::s_usingProgIDAuth = true;

const static uint kInvalidDateTime = (uint)-1;
const static uint kInvalidDateTime = UINT_MAX;


const QString ProgramInfo::kFromRecordedQuery =
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/storagegroup.cpp
Expand Up @@ -400,7 +400,7 @@ QStringList StorageGroup::GetFileInfo(const QString &lfilename)
if (fInfo.lastModified().isValid()) {
details << QString("%1").arg(fInfo.lastModified().toSecsSinceEpoch());
} else {
details << QString((uint)-1);
details << QString(UINT_MAX);
}
#endif
details << QString("%1").arg(fInfo.size());
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythtv/diseqc.h
Expand Up @@ -282,9 +282,9 @@ class DiSEqCDevSwitch : public DiSEqCDevDevice
dvbdev_switch_t m_type {kTypeTone};
uint m_address {0x10}; //DISEQC_ADR_SW_ALL
uint m_numPorts {2};
uint m_lastPos {(uint)-1};
uint m_lastHighBand {(uint)-1};
uint m_lastHorizontal {(uint)-1};
uint m_lastPos {UINT_MAX};
uint m_lastHighBand {UINT_MAX};
uint m_lastHorizontal {UINT_MAX};
dvbdev_vec_t m_children;

static const TypeTable kSwitchTypeTable[9];
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/frequencytables.h
Expand Up @@ -167,7 +167,7 @@ class TransportScanItem
uint GetMultiplexIdFromDB(void) const;

public:
uint m_mplexid {(uint)-1}; ///< DB Mplexid
uint m_mplexid {UINT_MAX}; ///< DB Mplexid

QString m_friendlyName; ///< Name to display in scanner dialog
uint m_friendlyNum {0}; ///< Frequency number (freqid w/freq table)
Expand Down
18 changes: 9 additions & 9 deletions mythtv/libs/libmythtv/recorders/v4l2encstreamhandler.h
Expand Up @@ -116,14 +116,14 @@ class V4L2encStreamHandler : public StreamHandler
int m_audio_volume {-1};
int m_lang_mode {-1}; ///< 0 is Main Lang; 1 is SAP Lang; 2 is Dual
uint m_low_bitrate_mode {V4L2_MPEG_VIDEO_BITRATE_MODE_VBR};
uint m_low_bitrate {(uint)-1};
uint m_low_peak_bitrate {(uint)-1};
uint m_low_bitrate {UINT_MAX};
uint m_low_peak_bitrate {UINT_MAX};
uint m_medium_bitrate_mode {V4L2_MPEG_VIDEO_BITRATE_MODE_VBR};
uint m_medium_bitrate {(uint)-1};
uint m_medium_peak_bitrate {(uint)-1};
uint m_medium_bitrate {UINT_MAX};
uint m_medium_peak_bitrate {UINT_MAX};
uint m_high_bitrate_mode {V4L2_MPEG_VIDEO_BITRATE_MODE_VBR};
uint m_high_bitrate {(uint)-1};
uint m_high_peak_bitrate {(uint)-1};
uint m_high_bitrate {UINT_MAX};
uint m_high_peak_bitrate {UINT_MAX};

static const int s_audio_rateL1[];
static const int s_audio_rateL2[];
Expand All @@ -134,10 +134,10 @@ class V4L2encStreamHandler : public StreamHandler
int m_fd {-1};
int m_audio_input;

uint m_width {(uint)-1};
uint m_height {(uint)-1};
uint m_width {UINT_MAX};
uint m_height {UINT_MAX};
bool m_has_lock {false};
uint m_signal_strength {(uint)-1};
uint m_signal_strength {UINT_MAX};

V4L2util m_v4l2;
DeviceReadBuffer *m_drb {nullptr};
Expand Down
6 changes: 3 additions & 3 deletions mythtv/programs/mythbackend/mainserver.cpp
Expand Up @@ -7531,7 +7531,7 @@ void MainServer::HandlePixmapLastModified(QStringList &slist, PlaybackSock *pbs)
if (lastmodified.isValid())
strlist = QStringList(QString::number(lastmodified.toSecsSinceEpoch()));
else
strlist = QStringList(QString::number((uint)-1));
strlist = QStringList(QString::number(UINT_MAX));
#endif
}
else
Expand Down Expand Up @@ -7605,7 +7605,7 @@ void MainServer::HandlePixmapGetIfModified(
if (lastmodified.isValid())
strlist += QString::number(lastmodified.toSecsSinceEpoch());
else
strlist += QString::number((uint)-1);
strlist += QString::number(UINT_MAX);
#endif
strlist += QString::number(data.size());
strlist += QString::number(qChecksum(data.constData(),
Expand Down Expand Up @@ -7647,7 +7647,7 @@ void MainServer::HandlePixmapGetIfModified(
if (lastmodified.isValid())
strlist += QString::number(lastmodified.toSecsSinceEpoch());
else
strlist += QString::number((uint)-1);
strlist += QString::number(UINT_MAX);
#endif
}

Expand Down

0 comments on commit 4b82e6b

Please sign in to comment.