mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Replace macros with C++17 features (see issue #3362)
- Convert ALLOW_UNUSED_LOCAL to [[maybe_unused]] - Convert WARN_UNUSED_RESULT to [[nodiscard]]
This commit is contained in:
@ -98,7 +98,6 @@
|
||||
#include "include/base/cef_bind.h"
|
||||
#include "include/base/cef_callback.h"
|
||||
#include "include/base/cef_callback_helpers.h"
|
||||
#include "include/base/cef_compiler_specific.h"
|
||||
#include "include/base/cef_logging.h"
|
||||
#include "include/base/cef_weak_ptr.h"
|
||||
|
||||
@ -191,7 +190,7 @@ class CallbackListBase {
|
||||
|
||||
// Registers |cb| for future notifications. Returns a CallbackListSubscription
|
||||
// whose destruction will cancel |cb|.
|
||||
CallbackListSubscription Add(CallbackType cb) WARN_UNUSED_RESULT {
|
||||
[[nodiscard]] CallbackListSubscription Add(CallbackType cb) {
|
||||
DCHECK(!cb.is_null());
|
||||
return CallbackListSubscription(base::BindOnce(
|
||||
&CallbackListBase::CancelCallback, weak_ptr_factory_.GetWeakPtr(),
|
||||
|
Reference in New Issue
Block a user