diff options
author | Robin Burchell <robin+git@viroteck.net> | 2019-07-17 09:42:58 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-07-17 09:47:52 +0200 |
commit | ed25d524f25f8d558b2d9c1720053f388acbf6a6 (patch) | |
tree | f454506fe4deccc0287b974f02052d745b188aaf /Libraries/LibAudio | |
parent | 2df6f0e87f0312f6ee5c2b8abc11729487276bd1 (diff) | |
download | serenity-ed25d524f25f8d558b2d9c1720053f388acbf6a6.zip |
ABuffer: move it and groove it
Diffstat (limited to 'Libraries/LibAudio')
-rw-r--r-- | Libraries/LibAudio/ABuffer.h | 4 | ||||
-rw-r--r-- | Libraries/LibAudio/AWavLoader.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Libraries/LibAudio/ABuffer.h b/Libraries/LibAudio/ABuffer.h index 30a3742e7d..53ccbb0694 100644 --- a/Libraries/LibAudio/ABuffer.h +++ b/Libraries/LibAudio/ABuffer.h @@ -53,8 +53,8 @@ struct ASample { class ABuffer : public RefCounted<ABuffer> { public: static RefPtr<ABuffer> from_pcm_data(ByteBuffer& data, int num_channels, int bits_per_sample, int source_rate); - ABuffer(Vector<ASample>& samples) - : m_samples(samples) + ABuffer(Vector<ASample>&& samples) + : m_samples(move(samples)) {} const Vector<ASample>& samples() const { return m_samples; } diff --git a/Libraries/LibAudio/AWavLoader.cpp b/Libraries/LibAudio/AWavLoader.cpp index 1369d6fb1a..e33200964f 100644 --- a/Libraries/LibAudio/AWavLoader.cpp +++ b/Libraries/LibAudio/AWavLoader.cpp @@ -217,5 +217,5 @@ RefPtr<ABuffer> ABuffer::from_pcm_data(ByteBuffer& data, int num_channels, int b // don't belong. ASSERT(!stream.handle_read_failure()); - return adopt(*new ABuffer(fdata)); + return adopt(*new ABuffer(move(fdata))); } |