Bug 1262753: P2. Add AudioDataBuffer::operator=. r=gerald
authorJean-Yves Avenard <jyavenard@mozilla.com>
Mon, 11 Apr 2016 21:01:45 +1000
changeset 331431 0434086421da8495b8791b27577f136b1f61456e
parent 331430 2c7da7353d7bfb6c709cc0937e0dcdcebdfe2fff
child 331432 1ccaf7f6a120f138e8e46d022413609602efde94
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald
bugs1262753
milestone48.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 1262753: P2. Add AudioDataBuffer::operator=. r=gerald MozReview-Commit-ID: D68ikKaDtj0
dom/media/AudioConverter.h
--- a/dom/media/AudioConverter.h
+++ b/dom/media/AudioConverter.h
@@ -82,16 +82,26 @@ public:
                   "Conversion not implemented yet");
   }
   explicit AudioDataBuffer(const AlignedFloatBuffer&& aBuffer)
     : mBuffer(Move(aBuffer))
   {
     static_assert(Format == AudioConfig::FORMAT_FLT,
                   "Conversion not implemented yet");
   }
+  AudioDataBuffer& operator=(AudioDataBuffer&& aOther)
+  {
+    mBuffer = Move(aOther.mBuffer);
+    return *this;
+  }
+  AudioDataBuffer& operator=(const AudioDataBuffer& aOther)
+  {
+    mBuffer = aOther.mBuffer;
+    return *this;
+  }
 
   Value* Data() const { return mBuffer.Data(); }
   size_t Length() const { return mBuffer.Length(); }
   size_t Size() const { return mBuffer.Size(); }
   AlignedBuffer<Value> Forget()
   {
     // Correct type -> Just give values as-is.
     return Move(mBuffer);