mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 1659950 - Move instead of copy where possible in nsMultiplexInputStream::SerializeInternal. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87574
This commit is contained in:
parent
2378891a30
commit
6b1b0ed613
@ -982,11 +982,10 @@ void nsMultiplexInputStream::SerializeInternal(
|
||||
streams.SetCapacity(streamCount);
|
||||
for (uint32_t index = 0; index < streamCount; index++) {
|
||||
uint32_t sizeUsed = 0;
|
||||
InputStreamParams childStreamParams;
|
||||
InputStreamHelper::SerializeInputStream(
|
||||
mStreams[index].mOriginalStream, childStreamParams, aFileDescriptors,
|
||||
aDelayedStart, maxSize.value(), &sizeUsed, aManager);
|
||||
streams.AppendElement(childStreamParams);
|
||||
mStreams[index].mOriginalStream, *streams.AppendElement(),
|
||||
aFileDescriptors, aDelayedStart, maxSize.value(), &sizeUsed,
|
||||
aManager);
|
||||
|
||||
MOZ_ASSERT(maxSize.value() >= sizeUsed);
|
||||
|
||||
@ -1002,7 +1001,7 @@ void nsMultiplexInputStream::SerializeInternal(
|
||||
params.status() = mStatus;
|
||||
params.startedReadingCurrent() = mStartedReadingCurrent;
|
||||
|
||||
aParams = params;
|
||||
aParams = std::move(params);
|
||||
|
||||
MOZ_ASSERT(aSizeUsed);
|
||||
*aSizeUsed = totalSizeUsed.value();
|
||||
|
Loading…
Reference in New Issue
Block a user