Bug 1404997 - P23. Make clang-tidy happier. r?pehrsons
MozReview-Commit-ID: HAMriNjiomO
--- a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp
+++ b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp
@@ -87,17 +87,17 @@ public:
unsigned short aWidth,
unsigned short aHeight,
VideoType aVideoType,
uint64_t aCaptureTime) = 0;
virtual void OnVideoFrameConverted(const webrtc::VideoFrame& aVideoFrame) = 0;
protected:
- virtual ~VideoConverterListener() {}
+ virtual ~VideoConverterListener()= default;
};
// I420 buffer size macros
#define YSIZE(x, y) (CheckedInt<int>(x) * (y))
#define CRSIZE(x, y) ((((x) + 1) >> 1) * (((y) + 1) >> 1))
#define I420SIZE(x, y) (YSIZE((x), (y)) + 2 * CRSIZE((x), (y)))
// An async video frame format converter.
@@ -2152,18 +2152,16 @@ MediaPipelineReceive::MediaPipelineRecei
: MediaPipeline(aPc,
RECEIVE,
aMainThread.forget(),
aStsThread.forget(),
aConduit.forget())
{
}
-MediaPipelineReceive::~MediaPipelineReceive() {}
-
class MediaPipelineReceiveAudio::PipelineListener
: public GenericReceiveListener
{
public:
PipelineListener(dom::MediaStreamTrack* aTrack,
RefPtr<MediaSessionConduit> aConduit)
: GenericReceiveListener(aTrack)
, mConduit(aConduit.forget())
--- a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.h
+++ b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.h
@@ -133,17 +133,18 @@ public:
// Gets an expiration time for CRC info given a reference time,
// this reference time would normally be the time of calling.
// This value can then be used to check if a RtpCSRCStats
// has expired via Expired(...)
static DOMHighResTimeStamp GetExpiryFromTime(
const DOMHighResTimeStamp aTime);
RtpCSRCStats(const uint32_t aCsrc, const DOMHighResTimeStamp aTime);
- ~RtpCSRCStats(){};
+ ~RtpCSRCStats() = default;
+
// Initialize a webidl representation suitable for adding to a report.
// This assumes that the webidl object is empty.
// @param aWebidlObj the webidl binding object to popluate
// @param aInboundRtpStreamId the associated RTCInboundRTPStreamStats.id
void GetWebidlInstance(dom::RTCRTPContributingSourceStats& aWebidlObj,
const nsString& aInboundRtpStreamId) const;
void SetTimestamp(const DOMHighResTimeStamp aTime) { mTimestamp = aTime; }
// Check if the RtpCSRCStats has expired, checks against a
@@ -412,16 +413,17 @@ public:
void SetPrincipalHandle_m(const PrincipalHandle& aPrincipalHandle) override;
void Start() override;
void Stop() override;
void OnRtpPacketReceived() override;
private:
+ virtual ~MediaPipelineReceiveAudio() = default;
// Separate class to allow ref counting
class PipelineListener;
RefPtr<PipelineListener> mListener;
};
// A specialization of pipeline for reading from the network and
// rendering video.
@@ -442,16 +444,17 @@ public:
void SetPrincipalHandle_m(const PrincipalHandle& aPrincipalHandle) override;
void Start() override;
void Stop() override;
void OnRtpPacketReceived() override;
private:
+ virtual ~MediaPipelineReceiveVideo() = default;
class PipelineRenderer;
friend class PipelineRenderer;
// Separate class to allow ref counting
class PipelineListener;
const RefPtr<PipelineRenderer> mRenderer;
RefPtr<PipelineListener> mListener;