Make fewer copies when using StringBuilder.

Replace calls to .str() which copies with .Release which moves in cases where that's safe.

This CL was generated by this command:
git grep -l 'StringBuilder' |
xargs perl -i -0 -pe "s/(rtc::StringBuilder (\S+);.*?return )\\g2.str\(\)/\$1\$2.Release\(\)/sg"

Bug: webrtc:8982
Change-Id: If4dadbeb039df010aaaa9e58da81c1971a84fe8f
Reviewed-on: https://webrtc-review.googlesource.com/100307
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24790}
This commit is contained in:
Jonas Olsson
2018-09-14 16:59:32 +02:00
committed by Commit Bot
parent 4e5342f06a
commit 84df1c724e
46 changed files with 65 additions and 65 deletions

View File

@ -28,7 +28,7 @@ std::string NetEqInput::PacketData::ToString() const {
<< "ts: " << header.timestamp << ", "
<< "ssrc: " << header.ssrc << "}, "
<< "payload bytes: " << payload.size() << "}";
return ss.str();
return ss.Release();
}
TimeLimitedNetEqInput::TimeLimitedNetEqInput(std::unique_ptr<NetEqInput> input,