Bug 1319741 - Use C++11's override and remove virtual where applicable in hal/. r=gsvelto
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Wed, 23 Nov 2016 13:21:06 +0200
changeset 371218 f6bafacee6583f5e671cfeeb13717bd692a3311c
parent 371217 77bcbb91d542fd53db6f5d3683af5442cf279971
child 371219 7a7511f0ab14e9b4e4d25b13a74d74e59c35a298
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgsvelto
bugs1319741
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1319741 - Use C++11's override and remove virtual where applicable in hal/. r=gsvelto MozReview-Commit-ID: 94CcvRoR6zQ
hal/Hal.cpp
--- a/hal/Hal.cpp
+++ b/hal/Hal.cpp
@@ -259,105 +259,105 @@ public:
 
   void BroadcastCachedInformation() {
     this->BroadcastInformation(mInfo);
   }
 
 protected:
   virtual void GetCurrentInformationInternal(InfoType*) = 0;
 
-  virtual void OnNotificationsDisabled() {
+  void OnNotificationsDisabled() override {
     mHasValidCache = false;
   }
 
 private:
   InfoType                mInfo;
   bool                    mHasValidCache;
 };
 
 class BatteryObserversManager : public CachingObserversManager<BatteryInformation>
 {
 protected:
-  void EnableNotifications() {
+  void EnableNotifications() override {
     PROXY_IF_SANDBOXED(EnableBatteryNotifications());
   }
 
-  void DisableNotifications() {
+  void DisableNotifications() override {
     PROXY_IF_SANDBOXED(DisableBatteryNotifications());
   }
 
-  void GetCurrentInformationInternal(BatteryInformation* aInfo) {
+  void GetCurrentInformationInternal(BatteryInformation* aInfo) override {
     PROXY_IF_SANDBOXED(GetCurrentBatteryInformation(aInfo));
   }
 };
 
 static BatteryObserversManager&
 BatteryObservers()
 {
   static BatteryObserversManager sBatteryObservers;
   AssertMainThread();
   return sBatteryObservers;
 }
 
 class NetworkObserversManager : public CachingObserversManager<NetworkInformation>
 {
 protected:
-  void EnableNotifications() {
+  void EnableNotifications() override {
     PROXY_IF_SANDBOXED(EnableNetworkNotifications());
   }
 
-  void DisableNotifications() {
+  void DisableNotifications() override {
     PROXY_IF_SANDBOXED(DisableNetworkNotifications());
   }
 
-  void GetCurrentInformationInternal(NetworkInformation* aInfo) {
+  void GetCurrentInformationInternal(NetworkInformation* aInfo) override {
     PROXY_IF_SANDBOXED(GetCurrentNetworkInformation(aInfo));
   }
 };
 
 static NetworkObserversManager&
 NetworkObservers()
 {
   static NetworkObserversManager sNetworkObservers;
   AssertMainThread();
   return sNetworkObservers;
 }
 
 class WakeLockObserversManager : public ObserversManager<WakeLockInformation>
 {
 protected:
-  void EnableNotifications() {
+  void EnableNotifications() override {
     PROXY_IF_SANDBOXED(EnableWakeLockNotifications());
   }
 
-  void DisableNotifications() {
+  void DisableNotifications() override {
     PROXY_IF_SANDBOXED(DisableWakeLockNotifications());
   }
 };
 
 static WakeLockObserversManager&
 WakeLockObservers()
 {
   static WakeLockObserversManager sWakeLockObservers;
   AssertMainThread();
   return sWakeLockObservers;
 }
 
 class ScreenConfigurationObserversManager : public CachingObserversManager<ScreenConfiguration>
 {
 protected:
-  void EnableNotifications() {
+  void EnableNotifications() override {
     PROXY_IF_SANDBOXED(EnableScreenConfigurationNotifications());
   }
 
-  void DisableNotifications() {
+  void DisableNotifications() override {
     PROXY_IF_SANDBOXED(DisableScreenConfigurationNotifications());
   }
 
-  void GetCurrentInformationInternal(ScreenConfiguration* aInfo) {
+  void GetCurrentInformationInternal(ScreenConfiguration* aInfo) override {
     PROXY_IF_SANDBOXED(GetCurrentScreenConfiguration(aInfo));
   }
 };
 
 static ScreenConfigurationObserversManager&
 ScreenConfigurationObservers()
 {
   AssertMainThread();
@@ -444,21 +444,21 @@ void SetScreenBrightness(double aBrightn
 {
   AssertMainThread();
   PROXY_IF_SANDBOXED(SetScreenBrightness(clamped(aBrightness, 0.0, 1.0)));
 }
 
 class SystemClockChangeObserversManager : public ObserversManager<int64_t>
 {
 protected:
-  void EnableNotifications() {
+  void EnableNotifications() override {
     PROXY_IF_SANDBOXED(EnableSystemClockChangeNotifications());
   }
 
-  void DisableNotifications() {
+  void DisableNotifications() override {
     PROXY_IF_SANDBOXED(DisableSystemClockChangeNotifications());
   }
 };
 
 static SystemClockChangeObserversManager&
 SystemClockChangeObservers()
 {
   static SystemClockChangeObserversManager sSystemClockChangeObservers;
@@ -484,21 +484,21 @@ void
 NotifySystemClockChange(const int64_t& aClockDeltaMS)
 {
   SystemClockChangeObservers().BroadcastInformation(aClockDeltaMS);
 }
 
 class SystemTimezoneChangeObserversManager : public ObserversManager<SystemTimezoneChangeInformation>
 {
 protected:
-  void EnableNotifications() {
+  void EnableNotifications() override {
     PROXY_IF_SANDBOXED(EnableSystemTimezoneChangeNotifications());
   }
 
-  void DisableNotifications() {
+  void DisableNotifications() override {
     PROXY_IF_SANDBOXED(DisableSystemTimezoneChangeNotifications());
   }
 };
 
 static SystemTimezoneChangeObserversManager&
 SystemTimezoneChangeObservers()
 {
   static SystemTimezoneChangeObserversManager sSystemTimezoneChangeObservers;