AK+Kernel: Remove NO_DISCARD macro hack

This was added as clang-format would mess up the formatting when using
[[nodiscard]] on a class, which is no longer the case.
This commit is contained in:
Linus Groh 2021-03-03 23:03:38 +01:00 committed by Andreas Kling
parent 95b49691c5
commit a5d6962148
Notes: sideshowbarker 2024-07-18 21:44:32 +09:00
2 changed files with 1 additions and 6 deletions

View file

@ -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

View file

@ -126,7 +126,7 @@ private:
};
template<typename LockType>
class NO_DISCARD ScopedSpinLock {
class [[nodiscard]] ScopedSpinLock {
AK_MAKE_NONCOPYABLE(ScopedSpinLock);