Skip to content

Commit

Permalink
tidy: Remove redundant control flow statements.
Browse files Browse the repository at this point in the history
the clang-tidy "redundant control flow" check pointed out where
functions that don't return a value end with a 'return' statement.
Changes made by the clang-tidy program.

https://clang.llvm.org/extra/clang-tidy/checks/readability-redundant-control-flow.html
  • Loading branch information
linuxdude42 committed Dec 23, 2019
1 parent 53ec53a commit 9c57288
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/decoders/decoderbase.h
Expand Up @@ -155,7 +155,7 @@ class DecoderBase

virtual int GetNumChapters(void) { return 0; }
virtual int GetCurrentChapter(long long /*framesPlayed*/) { return 0; }
virtual void GetChapterTimes(QList<long long> &/*times*/) { return; }
virtual void GetChapterTimes(QList<long long> &/*times*/) { }
virtual long long GetChapter(int /*chapter*/) { return m_framesPlayed; }
virtual bool DoRewind(long long desiredFrame, bool discardFrames = true);
virtual bool DoFastForward(long long desiredFrame, bool discardFrames = true);
Expand Down Expand Up @@ -188,7 +188,7 @@ class DecoderBase
virtual bool IsLastFrameKey(void) const = 0;
virtual void WriteStoredData(RingBuffer *rb, bool storevid,
long timecodeOffset) = 0;
virtual void ClearStoredData(void) { return; }
virtual void ClearStoredData(void) { }
virtual void SetRawAudioState(bool state) { m_getRawFrames = state; }
virtual bool GetRawAudioState(void) const { return m_getRawFrames; }
virtual void SetRawVideoState(bool state) { m_getRawVideo = state; }
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/decoders/mythcodeccontext.h
Expand Up @@ -77,7 +77,7 @@ class MTV_PUBLIC MythCodecContext
virtual void SetDeinterlacing (AVCodecContext */*Context*/, VideoDisplayProfile */*Profile*/, bool /*DoubleRate*/) {}
virtual void PostProcessFrame (AVCodecContext */*Context*/, VideoFrame */*Frame*/) {}
virtual bool IsDeinterlacing (bool &/*DoubleRate*/, bool /*StreamChange*/ = false) { return false; }
virtual void SetDecoderOptions (AVCodecContext */*Context*/, AVCodec */*Codec*/) { return; }
virtual void SetDecoderOptions (AVCodecContext */*Context*/, AVCodec */*Codec*/) { }
virtual bool DecoderWillResetOnFlush (void) { return false; }
virtual bool DecoderWillResetOnAspect(void) { return false; }
virtual bool DecoderNeedsReset (AVCodecContext */*Context*/) { return m_resetRequired; }
Expand Down
4 changes: 2 additions & 2 deletions mythtv/programs/mythtranscode/audioreencodebuffer.h
Expand Up @@ -58,13 +58,13 @@ class AudioReencodeBuffer : public AudioOutput
void ToggleMute(void) override { } // VolumeBase
MuteState GetMuteState(void) const override { return kMuteOff; } // VolumeBase
virtual MuteState IterateMutedChannels(void) { return kMuteOff; }
void SetSWVolume(int /*new_volume*/, bool /*save*/) override { return; } // VolumeBase
void SetSWVolume(int /*new_volume*/, bool /*save*/) override { } // VolumeBase
int GetSWVolume(void) override { return 100; } // VolumeBase
bool CanPassthrough(int /*samplerate*/, int /*channels*/, AVCodecID /*codec*/, int /*profile*/) const override // AudioOutput
{ return m_initpassthru; }

// These are pure virtual in AudioOutput, but we don't need them here
void bufferOutputData(bool /*y*/) override { return; } // AudioOutput
void bufferOutputData(bool /*y*/) override { } // AudioOutput
int readOutputData(unsigned char */*read_buffer*/, int /*max_length*/) override { return 0; } // AudioOutput

int m_channels {-1};
Expand Down

0 comments on commit 9c57288

Please sign in to comment.