diff options
author | Moonchild <moonchild@palemoon.org> | 2023-11-05 10:41:52 +0100 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2023-11-08 13:50:12 +0100 |
commit | 292ece5fde96a67a44830cb2c05463a06de0b373 (patch) | |
tree | bb897ea5b84dec63e322d7a342f7bf5eaf323c9c /xpcom/glue/nsDebug.h | |
parent | ccc8c3b988375858400e8cbb5cd3ed665ece7aa4 (diff) | |
download | uxp-292ece5fde96a67a44830cb2c05463a06de0b373.tar.gz |
Issue #2342: Use [[nodiscard]] in /xpcom and xpidl parser
Diffstat (limited to 'xpcom/glue/nsDebug.h')
-rw-r--r-- | xpcom/glue/nsDebug.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xpcom/glue/nsDebug.h b/xpcom/glue/nsDebug.h index eca36c5137..1608186745 100644 --- a/xpcom/glue/nsDebug.h +++ b/xpcom/glue/nsDebug.h @@ -35,7 +35,7 @@ * * Unused << NS_WARN_IF(NS_FAILED(FnWithSideEffects()); * - * (The |Unused <<| is necessary because of the MOZ_MUST_USE annotation.) + * (The |Unused <<| is necessary because of the [[nodiscard]] annotation.) * * However, note that the argument to this macro is evaluated in all builds. If * you just want a warning assertion, it is better to use NS_WARNING_ASSERTION @@ -47,8 +47,8 @@ */ #ifdef __cplusplus #ifdef DEBUG -inline MOZ_MUST_USE bool NS_warn_if_impl(bool aCondition, const char* aExpr, - const char* aFile, int32_t aLine) +[[nodiscard]] inline bool NS_warn_if_impl(bool aCondition, const char* aExpr, + const char* aFile, int32_t aLine) { if (MOZ_UNLIKELY(aCondition)) { NS_DebugBreak(NS_DEBUG_WARNING, nullptr, aExpr, aFile, aLine); |