From 901f12c9351defd245fb559aa546d7ff3bbeacf4 Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Mon, 6 Mar 2023 00:05:30 +1300 Subject: [PATCH] HookableEvents: Add [[nodiscard]] to Register --- Source/Core/Common/HookableEvent.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Common/HookableEvent.h b/Source/Core/Common/HookableEvent.h index 82a9e57d55..ea012bddf0 100644 --- a/Source/Core/Common/HookableEvent.h +++ b/Source/Core/Common/HookableEvent.h @@ -91,7 +91,7 @@ private: public: // Returns a handle that will unregister the listener when destroyed. - static EventHook Register(CallbackType callback, std::string name) + [[nodiscard]] static EventHook Register(CallbackType callback, std::string name) { auto& storage = GetStorage(); std::lock_guard lock(storage.m_mutex);