зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1318004
- Use C++11's override and remove virtual where applicable. r=Ehsan
MozReview-Commit-ID: H9tAe0YN1tx --HG-- extra : rebase_source : a11a03af4105afaae2945d2e0cad4eee65022f37
This commit is contained in:
Родитель
d9f67360d8
Коммит
d4ce06cca8
|
@ -741,7 +741,7 @@ public:
|
|||
, mResult(new TypedArrayResult(TimeStamp::Now()))
|
||||
{ }
|
||||
|
||||
~DoReadToTypedArrayEvent() {
|
||||
~DoReadToTypedArrayEvent() override {
|
||||
// If AbstractReadEvent::Run() has bailed out, we may need to cleanup
|
||||
// mResult, which is main-thread only data
|
||||
if (!mResult) {
|
||||
|
@ -778,7 +778,7 @@ public:
|
|||
, mResult(new StringResult(TimeStamp::Now()))
|
||||
{ }
|
||||
|
||||
~DoReadToStringEvent() {
|
||||
~DoReadToStringEvent() override {
|
||||
// If AbstraactReadEvent::Run() has bailed out, we may need to cleanup
|
||||
// mResult, which is main-thread only data
|
||||
if (!mResult) {
|
||||
|
|
|
@ -429,7 +429,7 @@ public:
|
|||
* An implementation of Observe that records statistics of all
|
||||
* file IO operations.
|
||||
*/
|
||||
void Observe(Observation& aOb);
|
||||
void Observe(Observation& aOb) override;
|
||||
|
||||
/**
|
||||
* Reflect recorded file IO statistics into Javascript
|
||||
|
|
|
@ -154,7 +154,7 @@ ScalarInfo::expiration() const
|
|||
class ScalarBase
|
||||
{
|
||||
public:
|
||||
virtual ~ScalarBase() = default;;
|
||||
virtual ~ScalarBase() = default;
|
||||
|
||||
// Set, Add and SetMaximum functions as described in the Telemetry IDL.
|
||||
virtual ScalarResult SetValue(nsIVariant* aValue) = 0;
|
||||
|
@ -194,7 +194,7 @@ public:
|
|||
using ScalarBase::SetValue;
|
||||
|
||||
ScalarUnsigned() : mStorage(0) {};
|
||||
~ScalarUnsigned() = default;;
|
||||
~ScalarUnsigned() override = default;
|
||||
|
||||
ScalarResult SetValue(nsIVariant* aValue) final;
|
||||
void SetValue(uint32_t aValue) final;
|
||||
|
@ -334,7 +334,7 @@ public:
|
|||
using ScalarBase::SetValue;
|
||||
|
||||
ScalarString() : mStorage(EmptyString()) {};
|
||||
~ScalarString() = default;;
|
||||
~ScalarString() override = default;
|
||||
|
||||
ScalarResult SetValue(nsIVariant* aValue) final;
|
||||
ScalarResult SetValue(const nsAString& aValue) final;
|
||||
|
@ -415,7 +415,7 @@ public:
|
|||
using ScalarBase::SetValue;
|
||||
|
||||
ScalarBoolean() : mStorage(false) {};
|
||||
~ScalarBoolean() = default;;
|
||||
~ScalarBoolean() override = default;
|
||||
|
||||
ScalarResult SetValue(nsIVariant* aValue) final;
|
||||
void SetValue(bool aValue) final;
|
||||
|
@ -514,7 +514,7 @@ public:
|
|||
typedef mozilla::Pair<nsCString, nsCOMPtr<nsIVariant>> KeyValuePair;
|
||||
|
||||
explicit KeyedScalar(uint32_t aScalarKind) : mScalarKind(aScalarKind) {};
|
||||
~KeyedScalar() = default;;
|
||||
~KeyedScalar() = default;
|
||||
|
||||
// Set, Add and SetMaximum functions as described in the Telemetry IDL.
|
||||
// These methods implicitly instantiate a Scalar[*] for each key.
|
||||
|
|
|
@ -175,8 +175,7 @@ class PR_CloseDelete
|
|||
public:
|
||||
constexpr PR_CloseDelete() = default;
|
||||
|
||||
PR_CloseDelete(const PR_CloseDelete& aOther)
|
||||
= default;
|
||||
PR_CloseDelete(const PR_CloseDelete& aOther) = default;
|
||||
|
||||
void operator()(PRFileDesc* aPtr) const
|
||||
{
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
KeyPair(SECKEYPrivateKey* aPrivateKey, SECKEYPublicKey* aPublicKey);
|
||||
|
||||
private:
|
||||
~KeyPair()
|
||||
~KeyPair() override
|
||||
{
|
||||
nsNSSShutDownPreventionLock locker;
|
||||
if (isAlreadyShutDown()) {
|
||||
|
@ -96,7 +96,7 @@ public:
|
|||
KeyGenRunnable(KeyType keyType, nsIIdentityKeyGenCallback * aCallback);
|
||||
|
||||
private:
|
||||
~KeyGenRunnable()
|
||||
~KeyGenRunnable() override
|
||||
{
|
||||
nsNSSShutDownPreventionLock locker;
|
||||
if (isAlreadyShutDown()) {
|
||||
|
@ -106,7 +106,7 @@ private:
|
|||
shutdown(ShutdownCalledFrom::Object);
|
||||
}
|
||||
|
||||
virtual void virtualDestroyNSSReference() override
|
||||
void virtualDestroyNSSReference() override
|
||||
{
|
||||
destructorSafeDestroyNSSReference();
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ public:
|
|||
nsIIdentitySignCallback * aCallback);
|
||||
|
||||
private:
|
||||
~SignRunnable()
|
||||
~SignRunnable() override
|
||||
{
|
||||
nsNSSShutDownPreventionLock locker;
|
||||
if (isAlreadyShutDown()) {
|
||||
|
|
|
@ -1115,10 +1115,10 @@ class RemoveFile : public Action
|
|||
public:
|
||||
RemoveFile() : mSkip(0) { }
|
||||
|
||||
int Parse(NS_tchar *line);
|
||||
int Prepare();
|
||||
int Execute();
|
||||
void Finish(int status);
|
||||
int Parse(NS_tchar *line) override;
|
||||
int Prepare() override;
|
||||
int Execute() override;
|
||||
void Finish(int status) override;
|
||||
|
||||
private:
|
||||
mozilla::UniquePtr<NS_tchar[]> mFile;
|
||||
|
@ -1246,10 +1246,10 @@ class RemoveDir : public Action
|
|||
public:
|
||||
RemoveDir() : mSkip(0) { }
|
||||
|
||||
virtual int Parse(NS_tchar *line);
|
||||
virtual int Prepare(); // check that the source dir exists
|
||||
virtual int Execute();
|
||||
virtual void Finish(int status);
|
||||
int Parse(NS_tchar *line) override;
|
||||
int Prepare() override; // check that the source dir exists
|
||||
int Execute() override;
|
||||
void Finish(int status) override;
|
||||
|
||||
private:
|
||||
mozilla::UniquePtr<NS_tchar[]> mDir;
|
||||
|
@ -1363,10 +1363,10 @@ class AddFile : public Action
|
|||
public:
|
||||
AddFile() : mAdded(false) { }
|
||||
|
||||
virtual int Parse(NS_tchar *line);
|
||||
virtual int Prepare();
|
||||
virtual int Execute();
|
||||
virtual void Finish(int status);
|
||||
int Parse(NS_tchar *line) override;
|
||||
int Prepare() override;
|
||||
int Execute() override;
|
||||
void Finish(int status) override;
|
||||
|
||||
private:
|
||||
mozilla::UniquePtr<NS_tchar[]> mFile;
|
||||
|
@ -1466,12 +1466,12 @@ class PatchFile : public Action
|
|||
public:
|
||||
PatchFile() : mPatchFile(nullptr), mPatchIndex(-1), buf(nullptr) { }
|
||||
|
||||
virtual ~PatchFile();
|
||||
~PatchFile() override;
|
||||
|
||||
virtual int Parse(NS_tchar *line);
|
||||
virtual int Prepare(); // should check for patch file and for checksum here
|
||||
virtual int Execute();
|
||||
virtual void Finish(int status);
|
||||
int Parse(NS_tchar *line) override;
|
||||
int Prepare() override; // should check for patch file and for checksum here
|
||||
int Execute() override;
|
||||
void Finish(int status) override;
|
||||
|
||||
private:
|
||||
int LoadSourceFile(FILE* ofile);
|
||||
|
@ -1787,10 +1787,10 @@ PatchFile::Finish(int status)
|
|||
class AddIfFile : public AddFile
|
||||
{
|
||||
public:
|
||||
virtual int Parse(NS_tchar *line);
|
||||
virtual int Prepare();
|
||||
virtual int Execute();
|
||||
virtual void Finish(int status);
|
||||
int Parse(NS_tchar *line) override;
|
||||
int Prepare() override;
|
||||
int Execute() override;
|
||||
void Finish(int status) override;
|
||||
|
||||
protected:
|
||||
mozilla::UniquePtr<NS_tchar[]> mTestFile;
|
||||
|
@ -1848,10 +1848,10 @@ AddIfFile::Finish(int status)
|
|||
class AddIfNotFile : public AddFile
|
||||
{
|
||||
public:
|
||||
virtual int Parse(NS_tchar *line);
|
||||
virtual int Prepare();
|
||||
virtual int Execute();
|
||||
virtual void Finish(int status);
|
||||
int Parse(NS_tchar *line) override;
|
||||
int Prepare() override;
|
||||
int Execute() override;
|
||||
void Finish(int status) override;
|
||||
|
||||
protected:
|
||||
mozilla::UniquePtr<NS_tchar[]> mTestFile;
|
||||
|
@ -1909,10 +1909,10 @@ AddIfNotFile::Finish(int status)
|
|||
class PatchIfFile : public PatchFile
|
||||
{
|
||||
public:
|
||||
virtual int Parse(NS_tchar *line);
|
||||
virtual int Prepare(); // should check for patch file and for checksum here
|
||||
virtual int Execute();
|
||||
virtual void Finish(int status);
|
||||
int Parse(NS_tchar *line) override;
|
||||
int Prepare() override; // should check for patch file and for checksum here
|
||||
int Execute() override;
|
||||
void Finish(int status) override;
|
||||
|
||||
private:
|
||||
mozilla::UniquePtr<NS_tchar[]> mTestFile;
|
||||
|
|
Загрузка…
Ссылка в новой задаче