Fix convenience macros for RtcEventLogParseStatus.

Bug: webrtc:14801
Change-Id: I56f352b9997fb6215cc04e90e50861985c22a2b4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296720
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39511}
This commit is contained in:
philipel 2023-03-08 17:27:31 +01:00 committed by WebRTC LUCI CQ
parent bc992a0ba9
commit f5127616aa

View file

@ -15,24 +15,24 @@
#include <vector>
#include "absl/strings/string_view.h"
#include "rtc_base/checks.h"
#define RTC_PARSE_CHECK_OR_RETURN(X) \
do { \
if (!(X)) \
return ParsedRtcEventLog::ParseStatus::Error(#X, __FILE__, __LINE__); \
return RtcEventLogParseStatus::Error(#X, __FILE__, __LINE__); \
} while (0)
#define RTC_PARSE_CHECK_OR_RETURN_MESSAGE(X, M) \
do { \
if (!(X)) \
return ParsedRtcEventLog::ParseStatus::Error((M), __FILE__, __LINE__); \
return RtcEventLogParseStatus::Error((M), __FILE__, __LINE__); \
} while (0)
#define RTC_PARSE_CHECK_OR_RETURN_OP(OP, X, Y) \
do { \
if (!((X)OP(Y))) \
return ParsedRtcEventLog::ParseStatus::Error(#X #OP #Y, __FILE__, \
__LINE__); \
return RtcEventLogParseStatus::Error(#X #OP #Y, __FILE__, __LINE__); \
} while (0)
#define RTC_PARSE_CHECK_OR_RETURN_EQ(X, Y) \
@ -55,13 +55,13 @@
do { \
if (X) { \
RTC_LOG(LS_WARNING) << (M); \
return ParsedRtcEventLog::ParseStatus::Success(); \
return RtcEventLogParseStatus::Success(); \
} \
} while (0)
#define RTC_RETURN_IF_ERROR(X) \
do { \
const ParsedRtcEventLog::ParseStatus _rtc_parse_status(X); \
const RtcEventLogParseStatus _rtc_parse_status(X); \
if (!_rtc_parse_status.ok()) { \
return _rtc_parse_status; \
} \