From dadaaee3e85495473719697c7bd80693e0d41490 Mon Sep 17 00:00:00 2001 From: Jonas Olsson Date: Tue, 12 Jun 2018 09:08:15 +0200 Subject: [PATCH] Remove stringstreams from p2p/ Bug: webrtc:8982 Change-Id: Ibb01bbb7e5f07d266ac7dff45932afe95abc761c Reviewed-on: https://webrtc-review.googlesource.com/82801 Commit-Queue: Jonas Olsson Reviewed-by: Tommi Cr-Commit-Position: refs/heads/master@{#23576} --- p2p/base/packetlossestimator.cc | 21 --------------------- p2p/base/packetlossestimator.h | 3 --- 2 files changed, 24 deletions(-) diff --git a/p2p/base/packetlossestimator.cc b/p2p/base/packetlossestimator.cc index ae05ff5107..be326f423d 100644 --- a/p2p/base/packetlossestimator.cc +++ b/p2p/base/packetlossestimator.cc @@ -8,8 +8,6 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include - #include "p2p/base/packetlossestimator.h" #include "rtc_base/checks.h" @@ -106,23 +104,4 @@ std::size_t PacketLossEstimator::tracked_packet_count_for_testing() const { return tracked_packets_.size(); } -std::string PacketLossEstimator::TrackedPacketsStringForTesting( - std::size_t max) const { - std::ostringstream oss; - - size_t count = 0; - for (const auto& p : tracked_packets_) { - const auto& id = p.first; - const auto& packet_info = p.second; - oss << "{ " << id << ", " << packet_info.sent_time << "}, "; - count += 1; - if (count == max) { - oss << "..."; - break; - } - } - - return oss.str(); -} - } // namespace cricket diff --git a/p2p/base/packetlossestimator.h b/p2p/base/packetlossestimator.h index 2256bdd2fe..9e334bbc8a 100644 --- a/p2p/base/packetlossestimator.h +++ b/p2p/base/packetlossestimator.h @@ -56,9 +56,6 @@ class PacketLossEstimator { std::size_t tracked_packet_count_for_testing() const; - // Output tracked packet state as a string. - std::string TrackedPacketsStringForTesting(std::size_t max) const; - private: struct PacketInfo { int64_t sent_time;