Reland "Replace RTC_WARN_UNUSED_RESULT with ABSL_MUST_USE_RESULT in c++ code"
This is a reland of 8c2250eddc7263036397179a0794b9b17d7afb38 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} Bug: webrtc:12336 Change-Id: I1cd017d45c1578528dec4532345950e9823f4a63 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201732 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@{#33003}
This commit is contained in:
committed by
Commit Bot
parent
ba91dbcb3e
commit
098da17f35
@ -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",
|
||||
]
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
#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"
|
||||
@ -23,7 +24,6 @@
|
||||
#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();
|
||||
|
||||
RTC_WARN_UNUSED_RESULT std::vector<ProbeClusterConfig> SetBitrates(
|
||||
ABSL_MUST_USE_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.
|
||||
RTC_WARN_UNUSED_RESULT std::vector<ProbeClusterConfig>
|
||||
ABSL_MUST_USE_RESULT std::vector<ProbeClusterConfig>
|
||||
OnMaxTotalAllocatedBitrate(int64_t max_total_allocated_bitrate,
|
||||
int64_t at_time_ms);
|
||||
|
||||
RTC_WARN_UNUSED_RESULT std::vector<ProbeClusterConfig> OnNetworkAvailability(
|
||||
ABSL_MUST_USE_RESULT std::vector<ProbeClusterConfig> OnNetworkAvailability(
|
||||
NetworkAvailability msg);
|
||||
|
||||
RTC_WARN_UNUSED_RESULT std::vector<ProbeClusterConfig> SetEstimatedBitrate(
|
||||
ABSL_MUST_USE_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);
|
||||
|
||||
RTC_WARN_UNUSED_RESULT std::vector<ProbeClusterConfig> RequestProbe(
|
||||
ABSL_MUST_USE_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);
|
||||
|
||||
RTC_WARN_UNUSED_RESULT std::vector<ProbeClusterConfig> Process(
|
||||
ABSL_MUST_USE_RESULT std::vector<ProbeClusterConfig> Process(
|
||||
int64_t at_time_ms);
|
||||
|
||||
private:
|
||||
@ -110,9 +110,9 @@ class ProbeController {
|
||||
kProbingComplete,
|
||||
};
|
||||
|
||||
RTC_WARN_UNUSED_RESULT std::vector<ProbeClusterConfig>
|
||||
ABSL_MUST_USE_RESULT std::vector<ProbeClusterConfig>
|
||||
InitiateExponentialProbing(int64_t at_time_ms);
|
||||
RTC_WARN_UNUSED_RESULT std::vector<ProbeClusterConfig> InitiateProbing(
|
||||
ABSL_MUST_USE_RESULT std::vector<ProbeClusterConfig> InitiateProbing(
|
||||
int64_t now_ms,
|
||||
std::vector<int64_t> bitrates_to_probe,
|
||||
bool probe_further);
|
||||
|
||||
@ -117,7 +117,6 @@ rtc_library("rtp_rtcp_format") {
|
||||
"../../rtc_base:deprecation",
|
||||
"../../rtc_base:divide_round",
|
||||
"../../rtc_base:rtc_base_approved",
|
||||
"../../rtc_base/system:unused",
|
||||
"../../system_wrappers",
|
||||
"../video_coding:codec_globals_headers",
|
||||
]
|
||||
@ -352,6 +351,7 @@ rtc_library("rtcp_transceiver") {
|
||||
]
|
||||
absl_deps = [
|
||||
"//third_party/abseil-cpp/absl/algorithm:container",
|
||||
"//third_party/abseil-cpp/absl/base:core_headers",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
|
||||
@ -11,9 +11,9 @@
|
||||
#ifndef MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_LOSS_NOTIFICATION_H_
|
||||
#define MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_LOSS_NOTIFICATION_H_
|
||||
|
||||
#include "absl/base/attributes.h"
|
||||
#include "modules/rtp_rtcp/source/rtcp_packet/common_header.h"
|
||||
#include "modules/rtp_rtcp/source/rtcp_packet/psfb.h"
|
||||
#include "rtc_base/system/unused.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace rtcp {
|
||||
@ -29,14 +29,15 @@ class LossNotification : public Psfb {
|
||||
|
||||
size_t BlockLength() const override;
|
||||
|
||||
ABSL_MUST_USE_RESULT
|
||||
bool Create(uint8_t* packet,
|
||||
size_t* index,
|
||||
size_t max_length,
|
||||
PacketReadyCallback callback) const override
|
||||
RTC_WARN_UNUSED_RESULT;
|
||||
PacketReadyCallback callback) const override;
|
||||
|
||||
// Parse assumes header is already parsed and validated.
|
||||
bool Parse(const CommonHeader& packet) RTC_WARN_UNUSED_RESULT;
|
||||
ABSL_MUST_USE_RESULT
|
||||
bool Parse(const CommonHeader& packet);
|
||||
|
||||
// Set all of the values transmitted by the loss notification message.
|
||||
// If the values may not be represented by a loss notification message,
|
||||
@ -44,9 +45,10 @@ class LossNotification : public Psfb {
|
||||
// when |last_recieved| is ahead of |last_decoded| by more than 0x7fff.
|
||||
// This is because |last_recieved| is represented on the wire as a delta,
|
||||
// and only 15 bits are available for that delta.
|
||||
ABSL_MUST_USE_RESULT
|
||||
bool Set(uint16_t last_decoded,
|
||||
uint16_t last_received,
|
||||
bool decodability_flag) RTC_WARN_UNUSED_RESULT;
|
||||
bool decodability_flag);
|
||||
|
||||
// RTP sequence number of the first packet belong to the last decoded
|
||||
// non-discardable frame.
|
||||
|
||||
Reference in New Issue
Block a user