Bug 1316290 - Replace default bodies of special member functions with = default, in layout. r?dholbert draft
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Wed, 09 Nov 2016 15:35:40 +0200
changeset 437650 4ed43328270b026f763164fc3558c1aa5b60b524
parent 437648 f3b1957daba7901a5fe5cf2c28d3e2fb7b20dc88
child 536691 e666b3680104ae96a76cdc3e542b571593d8fe90
push id35474
push userbmo:bpostelnicu@mozilla.com
push dateFri, 11 Nov 2016 09:01:42 +0000
reviewersdholbert
bugs1316290
milestone52.0a1
Bug 1316290 - Replace default bodies of special member functions with = default, in layout. r?dholbert MozReview-Commit-ID: LJiBYdYD1S5
layout/base/nsRefreshDriver.cpp
layout/style/nsCSSRuleProcessor.cpp
--- a/layout/base/nsRefreshDriver.cpp
+++ b/layout/base/nsRefreshDriver.cpp
@@ -512,17 +512,17 @@ private:
 
     void OnTimerStart()
     {
       if (!XRE_IsParentProcess()) {
         mLastChildTick = TimeStamp::Now();
       }
     }
   private:
-    ~RefreshDriverVsyncObserver() {}
+    ~RefreshDriverVsyncObserver() = default;
 
     void RecordTelemetryProbes(TimeStamp aVsyncTimestamp)
     {
       MOZ_ASSERT(NS_IsMainThread());
     #ifndef ANDROID  /* bug 1142079 */
       if (XRE_IsParentProcess()) {
         TimeDuration vsyncLatency = TimeStamp::Now() - aVsyncTimestamp;
         uint32_t sample = (uint32_t)vsyncLatency.ToMilliseconds();
@@ -861,17 +861,17 @@ public:
     MOZ_ASSERT(aPBackgroundChild);
 
     layout::PVsyncChild* actor = aPBackgroundChild->SendPVsyncConstructor();
     layout::VsyncChild* child = static_cast<layout::VsyncChild*>(actor);
     nsRefreshDriver::PVsyncActorCreated(child);
   }
 
 private:
-  virtual ~VsyncChildCreateCallback() {}
+  virtual ~VsyncChildCreateCallback() = default;
 
   void ActorCreated(PBackgroundChild* aPBackgroundChild) override
   {
     MOZ_ASSERT(NS_IsMainThread());
     MOZ_ASSERT(aPBackgroundChild);
     CreateVsyncActor(aPBackgroundChild);
   }
 
--- a/layout/style/nsCSSRuleProcessor.cpp
+++ b/layout/style/nsCSSRuleProcessor.cpp
@@ -765,19 +765,17 @@ RuleHash::SizeOfIncludingThis(MallocSize
 struct SelectorPair
 {
   SelectorPair(nsCSSSelector* aSelector, nsCSSSelector* aRightmostSelector)
     : mSelector(aSelector), mRightmostSelector(aRightmostSelector)
   {
     MOZ_ASSERT(aSelector);
     MOZ_ASSERT(mRightmostSelector);
   }
-  SelectorPair(const SelectorPair& aOther)
-    : mSelector(aOther.mSelector)
-    , mRightmostSelector(aOther.mRightmostSelector) {}
+  SelectorPair(const SelectorPair& aOther) = default;
   nsCSSSelector* const mSelector;
   nsCSSSelector* const mRightmostSelector;
 };
 
 // A hash table mapping atoms to lists of selectors
 struct AtomSelectorEntry : public PLDHashEntryHdr {
   nsIAtom *mAtom;
   // Auto length 2, because a decent fraction of these arrays ends up