diff options
| author | Shauren <shauren.trinity@gmail.com> | 2026-01-09 12:14:36 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2026-01-09 12:14:36 +0100 |
| commit | 6b4ff53187246ee6e2237a068d057ff86fb215df (patch) | |
| tree | b1ae62f53e3de8ae122327bacfac33d5f7a6e1c1 /src/common | |
| parent | 00542ca800113679d5897be9a63c620fb7c48d1c (diff) | |
Core/Misc: Mark some functions noexcept to reduce size of compiled code
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/Threading/MPSCQueue.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/Threading/MPSCQueue.h b/src/common/Threading/MPSCQueue.h index c4f95b80c5c..27afc822a4a 100644 --- a/src/common/Threading/MPSCQueue.h +++ b/src/common/Threading/MPSCQueue.h @@ -114,14 +114,14 @@ public: (_dummyPtr->*IntrusiveLink).~Atomic(); } - void Enqueue(T* input) + void Enqueue(T* input) noexcept { (input->*IntrusiveLink).store(nullptr, std::memory_order_release); T* prevHead = _head.exchange(input, std::memory_order_acq_rel); (prevHead->*IntrusiveLink).store(input, std::memory_order_release); } - bool Dequeue(T*& result) + bool Dequeue(T*& result) noexcept { T* tail = _tail.load(std::memory_order_relaxed); T* next = (tail->*IntrusiveLink).load(std::memory_order_acquire); |
