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

@ -17,8 +17,8 @@
#include <utility>
#include <vector>
#include "absl/base/attributes.h"
#include "rtc_base/checks.h"
#include "rtc_base/system/unused.h"
namespace webrtc {
@ -127,7 +127,7 @@ class SwapQueue {
// When specified, the T given in *input must pass the ItemVerifier() test.
// The contents of *input after the call are then also guaranteed to pass the
// ItemVerifier() test.
bool Insert(T* input) RTC_WARN_UNUSED_RESULT {
ABSL_MUST_USE_RESULT bool Insert(T* input) {
RTC_DCHECK(input);
RTC_DCHECK(queue_item_verifier_(*input));
@ -168,7 +168,7 @@ class SwapQueue {
// empty). When specified, The T given in *output must pass the ItemVerifier()
// test and the contents of *output after the call are then also guaranteed to
// pass the ItemVerifier() test.
bool Remove(T* output) RTC_WARN_UNUSED_RESULT {
ABSL_MUST_USE_RESULT bool Remove(T* output) {
RTC_DCHECK(output);
RTC_DCHECK(queue_item_verifier_(*output));