diff --git a/AK/Platform.h b/AK/Platform.h index 99fb61c8df..e1a15f78eb 100644 --- a/AK/Platform.h +++ b/AK/Platform.h @@ -60,11 +60,6 @@ #endif #define FLATTEN [[gnu::flatten]] -#ifdef NO_DISCARD -# undef NO_DISCARD -#endif -#define NO_DISCARD [[nodiscard]] - #ifndef __serenity__ # define PAGE_SIZE sysconf(_SC_PAGESIZE) #endif diff --git a/Kernel/SpinLock.h b/Kernel/SpinLock.h index c5729d9e08..a8cd389477 100644 --- a/Kernel/SpinLock.h +++ b/Kernel/SpinLock.h @@ -126,7 +126,7 @@ private: }; template -class NO_DISCARD ScopedSpinLock { +class [[nodiscard]] ScopedSpinLock { AK_MAKE_NONCOPYABLE(ScopedSpinLock);