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}
diff --git a/modules/audio_processing/aec3/frame_blocker_unittest.cc b/modules/audio_processing/aec3/frame_blocker_unittest.cc
index 6e73d4b..1fb7601 100644
--- a/modules/audio_processing/aec3/frame_blocker_unittest.cc
+++ b/modules/audio_processing/aec3/frame_blocker_unittest.cc
@@ -10,12 +10,12 @@
#include "modules/audio_processing/aec3/frame_blocker.h"
-#include <sstream>
#include <string>
#include <vector>
#include "modules/audio_processing/aec3/aec3_common.h"
#include "modules/audio_processing/aec3/block_framer.h"
+#include "rtc_base/strings/string_builder.h"
#include "test/gtest.h"
namespace webrtc {
@@ -228,7 +228,7 @@
#endif
std::string ProduceDebugText(int sample_rate_hz) {
- std::ostringstream ss;
+ rtc::StringBuilder ss;
ss << "Sample rate: " << sample_rate_hz;
return ss.str();
}
@@ -300,7 +300,7 @@
TEST(FrameBlocker, WrongNumberOfPreceedingApiCallsForExtractBlock) {
for (auto rate : {8000, 16000, 32000, 48000}) {
for (size_t num_calls = 0; num_calls < 4; ++num_calls) {
- std::ostringstream ss;
+ rtc::StringBuilder ss;
ss << "Sample rate: " << rate;
ss << ", Num preceeding InsertSubFrameAndExtractBlock calls: "
<< num_calls;