Delete modules/rtp_rtcp local DivideRoundToNearest in favor on one in rtc_base

To resolve a TODO

Bug: None
Change-Id: I90e10af24718e1aafd7e72076731b34c1110bb4b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153524
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29230}
This commit is contained in:
Danil Chapovalov 2019-09-18 18:51:34 +02:00 committed by Commit Bot
parent bd24260791
commit 693bf1eea1
2 changed files with 2 additions and 5 deletions

View File

@ -245,6 +245,7 @@ rtc_static_library("rtp_rtcp") {
"../../modules/audio_coding:audio_coding_module_typedefs",
"../../rtc_base:checks",
"../../rtc_base:deprecation",
"../../rtc_base:divide_round",
"../../rtc_base:gtest_prod",
"../../rtc_base:rate_limiter",
"../../rtc_base:rtc_base_approved",

View File

@ -13,15 +13,11 @@
#include <algorithm>
#include "rtc_base/checks.h"
#include "rtc_base/numerics/divide_round.h"
#include "rtc_base/time_utils.h"
namespace webrtc {
namespace {
// TODO(danilchap): Make generic, optimize and move to base.
inline int64_t DivideRoundToNearest(int64_t x, uint32_t y) {
// Callers ensure x is positive and x + y / 2 doesn't overflow.
return (x + y / 2) / y;
}
int64_t NtpOffsetMsCalledOnce() {
constexpr int64_t kNtpJan1970Sec = 2208988800;