Moved ostream operators for network units to test.
Added ToString functions in a separate header and move the ostream operators to a test only header. Bug: webrtc:8982 Change-Id: If547173aa39bbae2244531e2d3091886f14eae31 Reviewed-on: https://webrtc-review.googlesource.com/65280 Commit-Queue: Sebastian Jansson <srte@webrtc.org> Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22674}
This commit is contained in:
committed by
Commit Bot
parent
003211c5da
commit
01cb965d34
@ -12,7 +12,6 @@
|
||||
#define MODULES_CONGESTION_CONTROLLER_NETWORK_CONTROL_INCLUDE_NETWORK_UNITS_H_
|
||||
#include <stdint.h>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include "rtc_base/checks.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -386,11 +385,6 @@ TimeDelta operator/(const DataSize& size, const DataRate& rate);
|
||||
DataSize operator*(const DataRate& rate, const TimeDelta& duration);
|
||||
DataSize operator*(const TimeDelta& duration, const DataRate& rate);
|
||||
|
||||
::std::ostream& operator<<(::std::ostream& os, const DataRate& datarate);
|
||||
::std::ostream& operator<<(::std::ostream& os, const DataSize& datasize);
|
||||
::std::ostream& operator<<(::std::ostream& os, const Timestamp& timestamp);
|
||||
::std::ostream& operator<<(::std::ostream& os, const TimeDelta& delta);
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // MODULES_CONGESTION_CONTROLLER_NETWORK_CONTROL_INCLUDE_NETWORK_UNITS_H_
|
||||
|
||||
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright 2018 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
#ifndef MODULES_CONGESTION_CONTROLLER_NETWORK_CONTROL_INCLUDE_NETWORK_UNITS_TO_STRING_H_
|
||||
#define MODULES_CONGESTION_CONTROLLER_NETWORK_CONTROL_INCLUDE_NETWORK_UNITS_TO_STRING_H_
|
||||
|
||||
#include <string>
|
||||
#include "modules/congestion_controller/network_control/include/network_units.h"
|
||||
|
||||
namespace webrtc {
|
||||
std::string ToString(const DataRate& datarate);
|
||||
std::string ToString(const DataSize& datarate);
|
||||
std::string ToString(const Timestamp& datarate);
|
||||
std::string ToString(const TimeDelta& datarate);
|
||||
} // namespace webrtc
|
||||
#endif // MODULES_CONGESTION_CONTROLLER_NETWORK_CONTROL_INCLUDE_NETWORK_UNITS_TO_STRING_H_
|
||||
Reference in New Issue
Block a user