From cf352ac7f4b0708a0e8657c5468ff8dd16079692 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 15 Aug 2023 17:13:22 -0700 Subject: [PATCH] Move temporary into vector instead of copying (#1115) more efficient. Signed-off-by: Rosen Penev --- taglib/riff/rifffile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/taglib/riff/rifffile.cpp b/taglib/riff/rifffile.cpp index 0ede4b50..b9832fd0 100644 --- a/taglib/riff/rifffile.cpp +++ b/taglib/riff/rifffile.cpp @@ -236,7 +236,7 @@ void RIFF::File::setChunkData(const ByteVector &name, const ByteVector &data, bo chunk.offset = offset + 8; chunk.padding = data.size() % 2; - d->chunks.push_back(chunk); + d->chunks.push_back(std::move(chunk)); // Update the global size. @@ -338,7 +338,7 @@ void RIFF::File::read() } } - d->chunks.push_back(chunk); + d->chunks.push_back(std::move(chunk)); } }