Revert "Replace RTC_WARN_UNUSED_RESULT with ABSL_MUST_USE_RESULT in c++ code"

This reverts commit 8c2250eddc7263036397179a0794b9b17d7afb38.

Reason for revert: breaks downstream project

Original change's description:
> Replace RTC_WARN_UNUSED_RESULT with ABSL_MUST_USE_RESULT in c++ code
>
> Bug: webrtc:12336
> Change-Id: If76f00d0883b5c8a90d3ef5554f5e22384b3fb58
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/197620
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32978}

TBR=danilchap@webrtc.org,mbonadei@webrtc.org,crodbro@webrtc.org

Change-Id: I5c9d419785254878a825865808b56841cd30b9b5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:12336
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201731
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32979}
This commit is contained in:
Danil Chapovalov
2021-01-14 15:02:22 +00:00
committed by Commit Bot
parent 8c2250eddc
commit 4319b1695e
13 changed files with 31 additions and 39 deletions

View File

@ -226,10 +226,10 @@ rtc_library("probe_controller") {
"../../../rtc_base:macromagic",
"../../../rtc_base:safe_conversions",
"../../../rtc_base/experiments:field_trial_parser",
"../../../rtc_base/system:unused",
"../../../system_wrappers:metrics",
]
absl_deps = [
"//third_party/abseil-cpp/absl/base:core_headers",
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]

View File

@ -16,7 +16,6 @@
#include <initializer_list>
#include <vector>
#include "absl/base/attributes.h"
#include "absl/types/optional.h"
#include "api/rtc_event_log/rtc_event_log.h"
#include "api/transport/network_control.h"
@ -24,6 +23,7 @@
#include "api/units/data_rate.h"
#include "rtc_base/constructor_magic.h"
#include "rtc_base/experiments/field_trial_parser.h"
#include "rtc_base/system/unused.h"
namespace webrtc {
@ -63,7 +63,7 @@ class ProbeController {
RtcEventLog* event_log);
~ProbeController();
ABSL_MUST_USE_RESULT std::vector<ProbeClusterConfig> SetBitrates(
RTC_WARN_UNUSED_RESULT std::vector<ProbeClusterConfig> SetBitrates(
int64_t min_bitrate_bps,
int64_t start_bitrate_bps,
int64_t max_bitrate_bps,
@ -71,14 +71,14 @@ class ProbeController {
// The total bitrate, as opposed to the max bitrate, is the sum of the
// configured bitrates for all active streams.
ABSL_MUST_USE_RESULT std::vector<ProbeClusterConfig>
RTC_WARN_UNUSED_RESULT std::vector<ProbeClusterConfig>
OnMaxTotalAllocatedBitrate(int64_t max_total_allocated_bitrate,
int64_t at_time_ms);
ABSL_MUST_USE_RESULT std::vector<ProbeClusterConfig> OnNetworkAvailability(
RTC_WARN_UNUSED_RESULT std::vector<ProbeClusterConfig> OnNetworkAvailability(
NetworkAvailability msg);
ABSL_MUST_USE_RESULT std::vector<ProbeClusterConfig> SetEstimatedBitrate(
RTC_WARN_UNUSED_RESULT std::vector<ProbeClusterConfig> SetEstimatedBitrate(
int64_t bitrate_bps,
int64_t at_time_ms);
@ -87,7 +87,7 @@ class ProbeController {
void SetAlrStartTimeMs(absl::optional<int64_t> alr_start_time);
void SetAlrEndedTimeMs(int64_t alr_end_time);
ABSL_MUST_USE_RESULT std::vector<ProbeClusterConfig> RequestProbe(
RTC_WARN_UNUSED_RESULT std::vector<ProbeClusterConfig> RequestProbe(
int64_t at_time_ms);
// Sets a new maximum probing bitrate, without generating a new probe cluster.
@ -97,7 +97,7 @@ class ProbeController {
// created EXCEPT for |enable_periodic_alr_probing_|.
void Reset(int64_t at_time_ms);
ABSL_MUST_USE_RESULT std::vector<ProbeClusterConfig> Process(
RTC_WARN_UNUSED_RESULT std::vector<ProbeClusterConfig> Process(
int64_t at_time_ms);
private:
@ -110,9 +110,9 @@ class ProbeController {
kProbingComplete,
};
ABSL_MUST_USE_RESULT std::vector<ProbeClusterConfig>
RTC_WARN_UNUSED_RESULT std::vector<ProbeClusterConfig>
InitiateExponentialProbing(int64_t at_time_ms);
ABSL_MUST_USE_RESULT std::vector<ProbeClusterConfig> InitiateProbing(
RTC_WARN_UNUSED_RESULT std::vector<ProbeClusterConfig> InitiateProbing(
int64_t now_ms,
std::vector<int64_t> bitrates_to_probe,
bool probe_further);