Revert "Using safe casts of allocation limits in Call."
This reverts commit 4a9b4d6332f596867d2a8fb34ff5b4befb9848eb.
Reason for revert: Breaks downstream projects
Original change's description:
> Using safe casts of allocation limits in Call.
>
> Bug: None
> Change-Id: I71d0e1f92bf820d117b354dd7701c9c719cc2c0a
> Reviewed-on: https://webrtc-review.googlesource.com/61784
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22490}
TBR=nisse@webrtc.org,srte@webrtc.org
Change-Id: I720e97981574fd152cb7ed4204e29f9ea0b2e909
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/62920
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22491}
diff --git a/call/call.cc b/call/call.cc
index 79a5913..b3f3978 100644
--- a/call/call.cc
+++ b/call/call.cc
@@ -49,7 +49,6 @@
#include "rtc_base/constructormagic.h"
#include "rtc_base/location.h"
#include "rtc_base/logging.h"
-#include "rtc_base/numerics/safe_conversions.h"
#include "rtc_base/numerics/safe_minmax.h"
#include "rtc_base/ptr_util.h"
#include "rtc_base/rate_limiter.h"
@@ -1109,11 +1108,8 @@
void Call::OnAllocationLimitsChanged(uint32_t min_send_bitrate_bps,
uint32_t max_padding_bitrate_bps,
uint32_t total_bitrate_bps) {
- // TODO(srte): We should not mix signed and unsigned types for bitrates.
transport_send_->SetAllocatedSendBitrateLimits(
- rtc::dchecked_cast<int>(min_send_bitrate_bps),
- rtc::dchecked_cast<int>(max_padding_bitrate_bps),
- rtc::dchecked_cast<int>(total_bitrate_bps));
+ min_send_bitrate_bps, max_padding_bitrate_bps, total_bitrate_bps);
rtc::CritScope lock(&bitrate_crit_);
min_allocated_send_bitrate_bps_ = min_send_bitrate_bps;
configured_max_padding_bitrate_bps_ = max_padding_bitrate_bps;