From 9788534c77caa21a25027247d86fa5d41d47ebfe Mon Sep 17 00:00:00 2001 From: Taylor Brandstetter Date: Tue, 23 Feb 2016 12:58:15 -0800 Subject: [PATCH] Removing some redundant ostringstreams declarations. These shadow a variable in an exterior scope, and cause unneeded overhead. R=pthatcher@webrtc.org Review URL: https://codereview.webrtc.org/1714843003 . Cr-Commit-Position: refs/heads/master@{#11725} --- webrtc/api/webrtcsdp.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/webrtc/api/webrtcsdp.cc b/webrtc/api/webrtcsdp.cc index a6edf7ce18..eb7a66a823 100644 --- a/webrtc/api/webrtcsdp.cc +++ b/webrtc/api/webrtcsdp.cc @@ -1402,7 +1402,6 @@ void BuildRtpContentAttributes(const MediaContentDescription* media_desc, } else { auto track = media_desc->streams().begin(); const std::string& stream_id = track->sync_label; - std::ostringstream os; InitAttrLine(kAttributeMsid, &os); os << kSdpDelimiterColon << stream_id << kSdpDelimiterSpace << track->id; AddLine(os.str(), message); @@ -1457,7 +1456,6 @@ void BuildRtpContentAttributes(const MediaContentDescription* media_desc, if (track->ssrc_groups[i].ssrcs.empty()) { continue; } - std::ostringstream os; InitAttrLine(kAttributeSsrcGroup, &os); os << kSdpDelimiterColon << track->ssrc_groups[i].semantics; std::vector::const_iterator ssrc = @@ -1480,7 +1478,6 @@ void BuildRtpContentAttributes(const MediaContentDescription* media_desc, // The appdata consists of the "id" attribute of a MediaStreamTrack, // which corresponds to the "id" attribute of StreamParams. const std::string& stream_id = track->sync_label; - std::ostringstream os; InitAttrLine(kAttributeSsrc, &os); os << kSdpDelimiterColon << ssrc << kSdpDelimiterSpace << kSsrcAttributeMsid << kSdpDelimiterColon << stream_id