Remove simple stringstream usages.

This CL replaces std::o?stringstream with rtc::StringBuilder where that's possible to do without changing any of the surrounding code. It also updates includes and build files as appropriate.

The CL was generated by running 'git grep -l -P std::o?stringstream | xargs perl -pi -e "s/std::o?stringstream/rtc::StringBuilder/g"'. Then I've manually updated the #includes and BUILD files, run 'git cl format' and unstaged any file that would need more complex fixes.

Bug: webrtc:8982
Change-Id: Ibc32153f4a3fd177e260b6ad05ce393972549357
Reviewed-on: https://webrtc-review.googlesource.com/98460
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24605}
This commit is contained in:
Jonas Olsson
2018-09-06 13:41:30 +02:00
committed by Commit Bot
parent 96ede16a4e
commit 366a50c4ef
75 changed files with 191 additions and 141 deletions

View File

@ -35,6 +35,7 @@
#include "rtc_base/numerics/safe_minmax.h"
#include "rtc_base/protobuf_utils.h"
#include "rtc_base/refcountedobject.h"
#include "rtc_base/strings/string_builder.h"
#include "rtc_base/swap_queue.h"
#include "rtc_base/system/arch.h"
#include "rtc_base/task_queue.h"
@ -259,7 +260,7 @@ void OpenFileAndWriteMessage(const std::string& filename,
}
std::string ResourceFilePath(const std::string& name, int sample_rate_hz) {
std::ostringstream ss;
rtc::StringBuilder ss;
// Resource files are all stereo.
ss << name << sample_rate_hz / 1000 << "_stereo";
return test::ResourcePath(ss.str(), "pcm");
@ -280,7 +281,7 @@ std::string OutputFilePath(const std::string& name,
size_t num_reverse_input_channels,
size_t num_reverse_output_channels,
StreamDirection file_direction) {
std::ostringstream ss;
rtc::StringBuilder ss;
ss << name << "_i" << num_input_channels << "_" << input_rate / 1000 << "_ir"
<< num_reverse_input_channels << "_" << reverse_input_rate / 1000 << "_";
if (num_output_channels == 1) {