Skip to content

Commit

Permalink
cppcheck: Fix a few style warnings
Browse files Browse the repository at this point in the history
(cherry picked from commit 1ea7756)
  • Loading branch information
mark-kendall committed Mar 8, 2020
1 parent 1ea9726 commit e4c80f1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions mythtv/libs/libmythbase/mythsystemlegacy.h
Expand Up @@ -139,14 +139,14 @@ class MBASE_PUBLIC MythSystemLegacy : public QObject
QString& GetCommand(void) { return m_command; }
// FIXME: Eliminate. We should not allow setting the command
// after construcion.
void SetCommand(QString &cmd) { m_command = cmd; }
void SetCommand(const QString &cmd) { m_command = cmd; }

// FIXME: We should not return a reference here
// FIXME: Rename "GetArguments"
QStringList &GetArgs(void) { return m_args; }
// FIXME: Eliminate. We should not allow setting the arguements
// after construcion.
void SetArgs(QStringList &args) { m_args = args; }
void SetArgs(const QStringList &args) { m_args = args; }

int GetNice(void) { return m_nice; }
int GetIOPrio(void) { return m_ioprio; }
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythtv/mheg/dsmcccache.cpp
Expand Up @@ -237,7 +237,7 @@ void DSMCCCache::AddDirInfo(DSMCCCacheDir *pDir, const BiopBinding *pBB)
}

// Find File, Directory or Gateway by reference.
DSMCCCacheFile *DSMCCCache::FindFileData(DSMCCCacheReference &ref)
DSMCCCacheFile *DSMCCCache::FindFileData(const DSMCCCacheReference &ref)
{
// Find a file.
QMap<DSMCCCacheReference, DSMCCCacheFile*>::Iterator fil =
Expand All @@ -249,7 +249,7 @@ DSMCCCacheFile *DSMCCCache::FindFileData(DSMCCCacheReference &ref)
return *fil;
}

DSMCCCacheDir *DSMCCCache::FindDir(DSMCCCacheReference &ref)
DSMCCCacheDir *DSMCCCache::FindDir(const DSMCCCacheReference &ref)
{
// Find a directory.
QMap<DSMCCCacheReference, DSMCCCacheDir*>::Iterator dir =
Expand All @@ -261,7 +261,7 @@ DSMCCCacheDir *DSMCCCache::FindDir(DSMCCCacheReference &ref)
return *dir;
}

DSMCCCacheDir *DSMCCCache::FindGateway(DSMCCCacheReference &ref)
DSMCCCacheDir *DSMCCCache::FindGateway(const DSMCCCacheReference &ref)
{
// Find a gateway.
QMap<DSMCCCacheReference, DSMCCCacheDir*>::Iterator dir =
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythtv/mheg/dsmcccache.h
Expand Up @@ -109,9 +109,9 @@ class DSMCCCache

protected:
// Find File, Directory or Gateway by reference.
DSMCCCacheFile *FindFileData(DSMCCCacheReference &ref);
DSMCCCacheDir *FindDir(DSMCCCacheReference &ref);
DSMCCCacheDir *FindGateway(DSMCCCacheReference &ref);
DSMCCCacheFile *FindFileData(const DSMCCCacheReference &ref);
DSMCCCacheDir *FindDir(const DSMCCCacheReference &ref);
DSMCCCacheDir *FindGateway(const DSMCCCacheReference &ref);

DSMCCCacheReference m_GatewayRef; // Reference to the gateway

Expand Down
8 changes: 4 additions & 4 deletions mythtv/libs/libmythtv/recorders/HLS/HLSStream.h
@@ -1,5 +1,5 @@
#ifndef _HLS_Stream_h_
#define _HLS_Stream_h_
#ifndef HLS_STREAM_
#define HLS_STREAM_

#ifdef USING_LIBCRYPTO
// encryption related stuff
Expand Down Expand Up @@ -33,7 +33,7 @@ class HLSRecStream
void SetVersion(int x) { m_version = x; }
int TargetDuration(void) const { return m_targetDuration; }
void SetTargetDuration(int x) { m_targetDuration = x; }
uint64_t AverageBandwidth(void) { return m_bandwidth; }
uint64_t AverageBandwidth(void) { return static_cast<uint64_t>(m_bandwidth); }
uint64_t Bitrate(void) const { return m_bitrate; }
void SetBitrate(uint64_t bitrate) { m_bitrate = bitrate; }
uint64_t CurrentByteRate(void) const { return m_curByteRate; }
Expand All @@ -44,7 +44,7 @@ class HLSRecStream
void SetLive(bool x) { m_live = x; }
QString M3U8Url(void) const { return m_m3u8Url; }
QString SegmentBaseUrl(void) const { return m_segmentBaseUrl; }
void SetSegmentBaseUrl(QString &n) { m_segmentBaseUrl = n; }
void SetSegmentBaseUrl(const QString &n) { m_segmentBaseUrl = n; }

uint Duration(void) const;
uint NumCachedSegments(void) const;
Expand Down

0 comments on commit e4c80f1

Please sign in to comment.