зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1613985 - Use default for equivalent-to-default constructors/destructors in media. r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D65494 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
480328f3ad
Коммит
810fd1f507
|
@ -30,7 +30,7 @@ class ClearKeyDecryptor;
|
|||
|
||||
class CryptoMetaData {
|
||||
public:
|
||||
CryptoMetaData() {}
|
||||
CryptoMetaData() = default;
|
||||
|
||||
explicit CryptoMetaData(const cdm::InputBuffer_2* aInputBuffer) {
|
||||
Init(aInputBuffer);
|
||||
|
|
|
@ -90,7 +90,7 @@ class DtlsIdentity final {
|
|||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(DtlsIdentity)
|
||||
|
||||
private:
|
||||
~DtlsIdentity() {}
|
||||
~DtlsIdentity() = default;
|
||||
DISALLOW_COPY_ASSIGN(DtlsIdentity);
|
||||
|
||||
UniqueSECKEYPrivateKey private_key_;
|
||||
|
|
|
@ -22,7 +22,7 @@ class StunAddrsListener {
|
|||
NS_IMETHOD_(MozExternalRefCountType) Release();
|
||||
|
||||
protected:
|
||||
virtual ~StunAddrsListener() {}
|
||||
virtual ~StunAddrsListener() = default;
|
||||
|
||||
ThreadSafeAutoRefCnt mRefCnt;
|
||||
NS_DECL_OWNINGTHREAD
|
||||
|
@ -47,7 +47,7 @@ class StunAddrsRequestChild final : public PStunAddrsRequestChild {
|
|||
void Cancel();
|
||||
|
||||
protected:
|
||||
virtual ~StunAddrsRequestChild() {}
|
||||
virtual ~StunAddrsRequestChild() = default;
|
||||
|
||||
virtual mozilla::ipc::IPCResult RecvOnMDNSQueryComplete(
|
||||
const nsCString& aHostname, const Maybe<nsCString>& aAddress) override;
|
||||
|
|
|
@ -24,7 +24,7 @@ NrSocketProxyConfig::NrSocketProxyConfig(
|
|||
NrSocketProxyConfig::NrSocketProxyConfig(NrSocketProxyConfig&& aOrig)
|
||||
: mPrivate(std::move(aOrig.mPrivate)) {}
|
||||
|
||||
NrSocketProxyConfig::~NrSocketProxyConfig() {}
|
||||
NrSocketProxyConfig::~NrSocketProxyConfig() = default;
|
||||
|
||||
const net::WebrtcProxyConfig& NrSocketProxyConfig::GetConfig() const {
|
||||
return mPrivate->mProxyConfig;
|
||||
|
|
|
@ -99,7 +99,7 @@ class NrSocketBase {
|
|||
memset(cb_args_, 0, sizeof(cb_args_));
|
||||
memset(&my_addr_, 0, sizeof(my_addr_));
|
||||
}
|
||||
virtual ~NrSocketBase() {}
|
||||
virtual ~NrSocketBase() = default;
|
||||
|
||||
// Factory method; will create either an NrSocket, NrUdpSocketIpc, or
|
||||
// NrTcpSocketIpc as appropriate.
|
||||
|
@ -204,7 +204,7 @@ struct nr_udp_message {
|
|||
UniquePtr<MediaPacket> data;
|
||||
|
||||
private:
|
||||
~nr_udp_message() {}
|
||||
~nr_udp_message() = default;
|
||||
DISALLOW_COPY_ASSIGN(nr_udp_message);
|
||||
};
|
||||
|
||||
|
@ -226,7 +226,7 @@ class NrSocketIpc : public NrSocketBase {
|
|||
// For TCP PNecko, this is MainThread (and TCPSocket requires MainThread
|
||||
// currently)
|
||||
const nsCOMPtr<nsIEventTarget> io_thread_;
|
||||
virtual ~NrSocketIpc(){};
|
||||
virtual ~NrSocketIpc() = default;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_ASSIGN(NrSocketIpc);
|
||||
|
|
|
@ -73,7 +73,7 @@ class nrappkitCallback {
|
|||
public:
|
||||
nrappkitCallback(NR_async_cb cb, void* cb_arg, const char* function, int line)
|
||||
: cb_(cb), cb_arg_(cb_arg), function_(function), line_(line) {}
|
||||
virtual ~nrappkitCallback() {}
|
||||
virtual ~nrappkitCallback() = default;
|
||||
|
||||
virtual void Cancel() = 0;
|
||||
|
||||
|
@ -115,7 +115,7 @@ class nrappkitTimerCallback : public nrappkitCallback,
|
|||
|
||||
private:
|
||||
nsCOMPtr<nsITimer> timer_;
|
||||
virtual ~nrappkitTimerCallback() {}
|
||||
virtual ~nrappkitTimerCallback() = default;
|
||||
};
|
||||
|
||||
NS_IMPL_ISUPPORTS(nrappkitTimerCallback, nsITimerCallback, nsINamed)
|
||||
|
@ -145,7 +145,7 @@ class nrappkitScheduledCallback : public nrappkitCallback {
|
|||
|
||||
virtual void Cancel() override { cb_ = nullptr; }
|
||||
|
||||
~nrappkitScheduledCallback() {}
|
||||
~nrappkitScheduledCallback() = default;
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -760,7 +760,7 @@ NrIceStats NrIceCtx::Destroy() {
|
|||
return stats;
|
||||
}
|
||||
|
||||
NrIceCtx::~NrIceCtx() {}
|
||||
NrIceCtx::~NrIceCtx() = default;
|
||||
|
||||
void NrIceCtx::destroy_peer_ctx() { nr_ice_peer_ctx_destroy(&peer_); }
|
||||
|
||||
|
|
|
@ -106,7 +106,8 @@ class NrIceResolver {
|
|||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
|
||||
private:
|
||||
virtual ~PendingResolution(){};
|
||||
virtual ~PendingResolution() = default;
|
||||
|
||||
nsCOMPtr<nsIEventTarget> thread_;
|
||||
uint16_t port_;
|
||||
int transport_;
|
||||
|
|
|
@ -68,7 +68,7 @@ RLogConnector* RLogConnector::instance;
|
|||
RLogConnector::RLogConnector()
|
||||
: log_limit_(4096), mutex_("RLogConnector::mutex_"), disableCount_(0) {}
|
||||
|
||||
RLogConnector::~RLogConnector() {}
|
||||
RLogConnector::~RLogConnector() = default;
|
||||
|
||||
void RLogConnector::SetLogLimit(uint32_t new_limit) {
|
||||
OffTheBooksMutexAutoLock lock(mutex_);
|
||||
|
|
|
@ -240,7 +240,7 @@ class has_slots_interface {
|
|||
|
||||
// Doesn't really need to be virtual, but is for backwards compatibility
|
||||
// (it was virtual in a previous version of sigslot).
|
||||
virtual ~has_slots_interface() {}
|
||||
virtual ~has_slots_interface() = default;
|
||||
|
||||
public:
|
||||
void signal_connect(_signal_base_interface* sender) {
|
||||
|
@ -269,7 +269,7 @@ class _signal_base_interface {
|
|||
_signal_base_interface(slot_disconnect_t disc, slot_duplicate_t dupl)
|
||||
: m_slot_disconnect(disc), m_slot_duplicate(dupl) {}
|
||||
|
||||
~_signal_base_interface() {}
|
||||
~_signal_base_interface() = default;
|
||||
|
||||
public:
|
||||
void slot_disconnect(has_slots_interface* pslot) {
|
||||
|
@ -544,7 +544,7 @@ class signal_with_thread_policy : public _signal_base<mt_policy> {
|
|||
typedef typename base::connections_list connections_list;
|
||||
|
||||
public:
|
||||
signal_with_thread_policy() {}
|
||||
signal_with_thread_policy() = default;
|
||||
|
||||
template <class desttype>
|
||||
void connect(desttype* pclass, void (desttype::*pmemfun)(Args...)) {
|
||||
|
|
|
@ -90,7 +90,7 @@ class STUNUDPSocketFilter : public nsISocketFilter {
|
|||
NS_DECL_NSISOCKETFILTER
|
||||
|
||||
private:
|
||||
virtual ~STUNUDPSocketFilter() {}
|
||||
virtual ~STUNUDPSocketFilter() = default;
|
||||
|
||||
bool filter_incoming_packet(const mozilla::net::NetAddr* remote_addr,
|
||||
const uint8_t* data, uint32_t len);
|
||||
|
@ -225,7 +225,7 @@ class STUNTCPSocketFilter : public nsISocketFilter {
|
|||
NS_DECL_NSISOCKETFILTER
|
||||
|
||||
private:
|
||||
virtual ~STUNTCPSocketFilter() {}
|
||||
virtual ~STUNTCPSocketFilter() = default;
|
||||
|
||||
bool filter_incoming_packet(const uint8_t* data, uint32_t len);
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ class nsStunUDPSocketFilterHandler : public nsISocketFilterHandler {
|
|||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSISOCKETFILTERHANDLER
|
||||
private:
|
||||
virtual ~nsStunUDPSocketFilterHandler() {}
|
||||
virtual ~nsStunUDPSocketFilterHandler() = default;
|
||||
};
|
||||
|
||||
#define NS_STUN_TCP_SOCKET_FILTER_HANDLER_CID \
|
||||
|
@ -35,7 +35,7 @@ class nsStunTCPSocketFilterHandler : public nsISocketFilterHandler {
|
|||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSISOCKETFILTERHANDLER
|
||||
private:
|
||||
virtual ~nsStunTCPSocketFilterHandler() {}
|
||||
virtual ~nsStunTCPSocketFilterHandler() = default;
|
||||
};
|
||||
|
||||
#endif // stun_socket_filter_h__
|
||||
|
|
|
@ -196,7 +196,7 @@ class DummySocket : public NrSocketBase {
|
|||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(DummySocket, override);
|
||||
|
||||
private:
|
||||
~DummySocket() {}
|
||||
~DummySocket() = default;
|
||||
|
||||
DISALLOW_COPY_ASSIGN(DummySocket);
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ class MtransportTestUtils {
|
|||
public:
|
||||
MtransportTestUtils() { InitServices(); }
|
||||
|
||||
~MtransportTestUtils() {}
|
||||
~MtransportTestUtils() = default;
|
||||
|
||||
void InitServices() {
|
||||
nsresult rv;
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace {
|
|||
class TimerTest : public MtransportTest {
|
||||
public:
|
||||
TimerTest() : MtransportTest(), handle_(nullptr), fired_(false) {}
|
||||
virtual ~TimerTest() {}
|
||||
virtual ~TimerTest() = default;
|
||||
|
||||
int ArmTimer(int timeout) {
|
||||
int ret;
|
||||
|
|
|
@ -48,7 +48,7 @@ class SendPeriodic : public nsITimerCallback {
|
|||
NS_DECL_NSITIMERCALLBACK
|
||||
|
||||
protected:
|
||||
virtual ~SendPeriodic() {}
|
||||
virtual ~SendPeriodic() = default;
|
||||
|
||||
TransportTestPeer* peer_;
|
||||
int to_send_;
|
||||
|
@ -311,9 +311,9 @@ NS_IMETHODIMP SendPeriodic::Notify(nsITimer* timer) {
|
|||
|
||||
class SctpTransportTest : public MtransportTest {
|
||||
public:
|
||||
SctpTransportTest() {}
|
||||
SctpTransportTest() = default;
|
||||
|
||||
~SctpTransportTest() {}
|
||||
~SctpTransportTest() = default;
|
||||
|
||||
static void debug_printf(const char* format, ...) {
|
||||
va_list ap;
|
||||
|
@ -363,8 +363,8 @@ class SctpTransportTest : public MtransportTest {
|
|||
}
|
||||
|
||||
protected:
|
||||
TransportTestPeer* p1_;
|
||||
TransportTestPeer* p2_;
|
||||
TransportTestPeer* p1_ = nullptr;
|
||||
TransportTestPeer* p2_ = nullptr;
|
||||
};
|
||||
|
||||
TEST_F(SctpTransportTest, TestConnect) { ConnectSocket(); }
|
||||
|
|
|
@ -116,7 +116,7 @@ class SocketHandler : public nsASocketHandler {
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
protected:
|
||||
virtual ~SocketHandler() {}
|
||||
virtual ~SocketHandler() = default;
|
||||
|
||||
private:
|
||||
SocketTransportServiceTest* test_;
|
||||
|
|
|
@ -107,7 +107,7 @@ class TestStunTcpServer : public TestStunServer {
|
|||
virtual nr_socket* GetSendingSocket(nr_socket* sock);
|
||||
|
||||
protected:
|
||||
TestStunTcpServer() {}
|
||||
TestStunTcpServer() = default;
|
||||
static void accept_cb(NR_SOCKET sock, int how, void* cb_arg);
|
||||
|
||||
private:
|
||||
|
|
|
@ -101,7 +101,7 @@ class TransportLayerDummy : public TransportLayer {
|
|||
|
||||
class Inspector {
|
||||
public:
|
||||
virtual ~Inspector() {}
|
||||
virtual ~Inspector() = default;
|
||||
|
||||
virtual void Inspect(TransportLayer* layer, const unsigned char* data,
|
||||
size_t len) = 0;
|
||||
|
@ -111,7 +111,7 @@ class Inspector {
|
|||
class TransportLayerLossy : public TransportLayer {
|
||||
public:
|
||||
TransportLayerLossy() : loss_mask_(0), packet_(0), inspector_(nullptr) {}
|
||||
~TransportLayerLossy() {}
|
||||
~TransportLayerLossy() = default;
|
||||
|
||||
TransportResult SendPacket(MediaPacket& packet) override {
|
||||
MOZ_MTLOG(ML_NOTICE, LAYER_INFO << "SendPacket(" << packet.len() << ")");
|
||||
|
|
|
@ -93,7 +93,7 @@ class TurnClient : public MtransportTest {
|
|||
received_(0),
|
||||
protocol_(IPPROTO_UDP) {}
|
||||
|
||||
~TurnClient() {}
|
||||
~TurnClient() = default;
|
||||
|
||||
static void SetUpTestCase() {
|
||||
NrIceCtx::InitializeGlobals(false, false, false);
|
||||
|
|
|
@ -193,7 +193,7 @@ class TestNat {
|
|||
private:
|
||||
std::set<TestNrSocket*> sockets_;
|
||||
|
||||
~TestNat() {}
|
||||
~TestNat() = default;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -251,7 +251,7 @@ class TestNrSocket : public NrSocketBase {
|
|||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(UdpPacket);
|
||||
|
||||
private:
|
||||
~UdpPacket() {}
|
||||
~UdpPacket() = default;
|
||||
};
|
||||
|
||||
class PortMapping {
|
||||
|
|
|
@ -41,7 +41,7 @@ class TransportLayer : public sigslot::has_slots<> {
|
|||
// Is this a stream or datagram flow
|
||||
TransportLayer() : state_(TS_NONE), flow_id_(), downward_(nullptr) {}
|
||||
|
||||
virtual ~TransportLayer() {}
|
||||
virtual ~TransportLayer() = default;
|
||||
|
||||
// Called to initialize
|
||||
nsresult Init(); // Called by Insert() to set up -- do not override
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace mozilla {
|
|||
|
||||
class TransportLayerLogging : public TransportLayer {
|
||||
public:
|
||||
TransportLayerLogging() {}
|
||||
TransportLayerLogging() = default;
|
||||
|
||||
// Overrides for TransportLayer
|
||||
TransportResult SendPacket(MediaPacket& packet) override;
|
||||
|
|
|
@ -91,7 +91,7 @@ class TransportLayerLoopback : public TransportLayer {
|
|||
NS_DECL_NSINAMED
|
||||
|
||||
private:
|
||||
virtual ~Deliverer() {}
|
||||
virtual ~Deliverer() = default;
|
||||
|
||||
DISALLOW_COPY_ASSIGN(Deliverer);
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ class TransportLayerDtls;
|
|||
class TransportLayerSrtp final : public TransportLayer {
|
||||
public:
|
||||
explicit TransportLayerSrtp(TransportLayerDtls& dtls);
|
||||
virtual ~TransportLayerSrtp(){};
|
||||
virtual ~TransportLayerSrtp() = default;
|
||||
|
||||
// Transport layer overrides.
|
||||
void WasInserted() override;
|
||||
|
|
Загрузка…
Ссылка в новой задаче