Bug 1311669 - Use C++11's override and remove virtual where applicable. r=valentin
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Tue, 08 Nov 2016 16:36:58 +0200
changeset 351745 73a97f8ffebac71fb4b5d505e2aa0da35a013d8c
parent 351744 6dae0685c9d21b30fbe39ebb31254c733fd43900
child 351746 fe3fe09d24c8619d7b4a71aa6c5fccdb05f98636
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvalentin
bugs1311669
milestone52.0a1
Bug 1311669 - Use C++11's override and remove virtual where applicable. r=valentin MozReview-Commit-ID: Ab5BC8NhbIO
netwerk/cookie/nsCookieService.cpp
netwerk/dns/nsDNSService2.cpp
netwerk/sctp/datachannel/DataChannel.cpp
netwerk/streamconv/nsStreamConverterService.cpp
--- a/netwerk/cookie/nsCookieService.cpp
+++ b/netwerk/cookie/nsCookieService.cpp
@@ -361,17 +361,17 @@ public:
 
 /******************************************************************************
  * InsertCookieDBListener impl:
  * mozIStorageStatementCallback used to track asynchronous insertion operations.
  ******************************************************************************/
 class InsertCookieDBListener final : public DBListenerErrorHandler
 {
 private:
-  virtual const char *GetOpType() override { return "INSERT"; }
+  const char *GetOpType() override { return "INSERT"; }
 
   ~InsertCookieDBListener() = default;
 
 public:
   NS_DECL_ISUPPORTS
 
   explicit InsertCookieDBListener(DBState* dbState) : DBListenerErrorHandler(dbState) { }
   NS_IMETHOD HandleResult(mozIStorageResultSet*) override
@@ -397,17 +397,17 @@ NS_IMPL_ISUPPORTS(InsertCookieDBListener
 
 /******************************************************************************
  * UpdateCookieDBListener impl:
  * mozIStorageStatementCallback used to track asynchronous update operations.
  ******************************************************************************/
 class UpdateCookieDBListener final : public DBListenerErrorHandler
 {
 private:
-  virtual const char *GetOpType() override { return "UPDATE"; }
+  const char *GetOpType() override { return "UPDATE"; }
 
   ~UpdateCookieDBListener() = default;
 
 public:
   NS_DECL_ISUPPORTS
 
   explicit UpdateCookieDBListener(DBState* dbState) : DBListenerErrorHandler(dbState) { }
   NS_IMETHOD HandleResult(mozIStorageResultSet*) override
@@ -425,17 +425,17 @@ NS_IMPL_ISUPPORTS(UpdateCookieDBListener
 
 /******************************************************************************
  * RemoveCookieDBListener impl:
  * mozIStorageStatementCallback used to track asynchronous removal operations.
  ******************************************************************************/
 class RemoveCookieDBListener final : public DBListenerErrorHandler
 {
 private:
-  virtual const char *GetOpType() override { return "REMOVE"; }
+  const char *GetOpType() override { return "REMOVE"; }
 
   ~RemoveCookieDBListener() = default;
 
 public:
   NS_DECL_ISUPPORTS
 
   explicit RemoveCookieDBListener(DBState* dbState) : DBListenerErrorHandler(dbState) { }
   NS_IMETHOD HandleResult(mozIStorageResultSet*) override
@@ -453,17 +453,17 @@ NS_IMPL_ISUPPORTS(RemoveCookieDBListener
 
 /******************************************************************************
  * ReadCookieDBListener impl:
  * mozIStorageStatementCallback used to track asynchronous removal operations.
  ******************************************************************************/
 class ReadCookieDBListener final : public DBListenerErrorHandler
 {
 private:
-  virtual const char *GetOpType() override { return "READ"; }
+  const char *GetOpType() override { return "READ"; }
   bool mCanceled;
 
   ~ReadCookieDBListener() = default;
 
 public:
   NS_DECL_ISUPPORTS
 
   explicit ReadCookieDBListener(DBState* dbState)
--- a/netwerk/dns/nsDNSService2.cpp
+++ b/netwerk/dns/nsDNSService2.cpp
@@ -393,19 +393,19 @@ class nsDNSSyncRequest : public nsResolv
 {
 public:
     explicit nsDNSSyncRequest(PRMonitor *mon)
         : mDone(false)
         , mStatus(NS_OK)
         , mMonitor(mon) {}
     virtual ~nsDNSSyncRequest() = default;
 
-    void OnLookupComplete(nsHostResolver *, nsHostRecord *, nsresult);
-    bool EqualsAsyncListener(nsIDNSListener *aListener);
-    size_t SizeOfIncludingThis(mozilla::MallocSizeOf) const;
+    void OnLookupComplete(nsHostResolver *, nsHostRecord *, nsresult) override;
+    bool EqualsAsyncListener(nsIDNSListener *aListener) override;
+    size_t SizeOfIncludingThis(mozilla::MallocSizeOf) const override;
 
     bool                   mDone;
     nsresult               mStatus;
     RefPtr<nsHostRecord> mHostRecord;
 
 private:
     PRMonitor             *mMonitor;
 };
--- a/netwerk/sctp/datachannel/DataChannel.cpp
+++ b/netwerk/sctp/datachannel/DataChannel.cpp
@@ -2339,17 +2339,17 @@ DataChannelConnection::SendBlob(uint16_t
 class DataChannelBlobSendRunnable : public Runnable
 {
 public:
   DataChannelBlobSendRunnable(already_AddRefed<DataChannelConnection>& aConnection,
                               uint16_t aStream)
     : mConnection(aConnection)
     , mStream(aStream) {}
 
-  ~DataChannelBlobSendRunnable()
+  ~DataChannelBlobSendRunnable() override
   {
     if (!NS_IsMainThread() && mConnection) {
       MOZ_ASSERT(false);
       // explicitly leak the connection if destroyed off mainthread
       Unused << mConnection.forget().take();
     }
   }
 
--- a/netwerk/streamconv/nsStreamConverterService.cpp
+++ b/netwerk/streamconv/nsStreamConverterService.cpp
@@ -188,17 +188,17 @@ nsStreamConverterService::ParseFromTo(co
 
 typedef nsClassHashtable<nsCStringHashKey, BFSTableData> BFSHashTable;
 
 
 // nsObjectHashtable enumerator functions.
 
 class CStreamConvDeallocator : public nsDequeFunctor {
 public:
-    virtual void* operator()(void* anObject) {
+    void* operator()(void* anObject) override {
         nsCString *string = (nsCString*)anObject;
         delete string;
         return 0;
     }
 };
 
 // walks the graph using a breadth-first-search algorithm which generates a discovered
 // verticies tree. This tree is then walked up (from destination vertex, to origin vertex)