Move temporary into vector instead of copying (#1115)

more efficient.

Signed-off-by: Rosen Penev <[email protected]>
This commit is contained in:
Rosen Penev
2023-08-15 19:13:22 -05:00
committed by GitHub
parent bbb8221301
commit cf352ac7f4
+2 -2
View File
@@ -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));
}
}