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:
Danil Chapovalov
2021-01-14 16:15:31 +01:00
committed by Commit Bot
parent ba91dbcb3e
commit 098da17f35
13 changed files with 39 additions and 29 deletions

View File

@ -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.