Bug 1429904 - Let the compiler implement the FrameKey copy constructor for us. r?njn draft
authorMarkus Stange <mstange@themasta.com>
Tue, 27 Feb 2018 23:08:19 -0500
changeset 762100 b366941fbef50c430114f3cf9f41008027f6761b
parent 762099 f5074e4a6df03782e8ae18384c71f868ab8b0942
child 762101 5ab6d98acb6a6624c841839de838c3bc470e8631
push id101088
push userbmo:mstange@themasta.com
push dateThu, 01 Mar 2018 20:52:26 +0000
reviewersnjn
bugs1429904
milestone60.0a1
Bug 1429904 - Let the compiler implement the FrameKey copy constructor for us. r?njn MozReview-Commit-ID: 9e9rMkEAyeL
tools/profiler/core/ProfileBufferEntry.h
--- a/tools/profiler/core/ProfileBufferEntry.h
+++ b/tools/profiler/core/ProfileBufferEntry.h
@@ -178,31 +178,24 @@ public:
     mozilla::Maybe<JITAddress> mJITAddress;
     mozilla::Maybe<uint32_t> mJITDepth;
 
     explicit FrameKey(const char* aLocation)
      : mLocation(aLocation)
     {
     }
 
-    FrameKey(const FrameKey& aToCopy)
-     : mLocation(aToCopy.mLocation)
-     , mLine(aToCopy.mLine)
-     , mCategory(aToCopy.mCategory)
-     , mJITAddress(aToCopy.mJITAddress)
-     , mJITDepth(aToCopy.mJITDepth)
-    {
-    }
-
     FrameKey(const JITAddress& aJITAddress, uint32_t aJITDepth)
      : mJITAddress(mozilla::Some(aJITAddress))
      , mJITDepth(mozilla::Some(aJITDepth))
     {
     }
 
+    FrameKey(const FrameKey& aToCopy) = default;
+
     uint32_t Hash() const;
     bool operator==(const FrameKey& aOther) const;
   };
 
   struct StackKey {
     mozilla::Maybe<uint32_t> mPrefixStackIndex;
     uint32_t mFrameIndex;