diff options
Diffstat (limited to 'src/common/threadsafe_queue.h')
| -rw-r--r-- | src/common/threadsafe_queue.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/common/threadsafe_queue.h b/src/common/threadsafe_queue.h index 8268bbd5c..a4647314a 100644 --- a/src/common/threadsafe_queue.h +++ b/src/common/threadsafe_queue.h | |||
| @@ -25,15 +25,15 @@ public: | |||
| 25 | delete read_ptr; | 25 | delete read_ptr; |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | std::size_t Size() const { | 28 | [[nodiscard]] std::size_t Size() const { |
| 29 | return size.load(); | 29 | return size.load(); |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | bool Empty() const { | 32 | [[nodiscard]] bool Empty() const { |
| 33 | return Size() == 0; | 33 | return Size() == 0; |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | T& Front() const { | 36 | [[nodiscard]] T& Front() const { |
| 37 | return read_ptr->current; | 37 | return read_ptr->current; |
| 38 | } | 38 | } |
| 39 | 39 | ||
| @@ -130,15 +130,15 @@ private: | |||
| 130 | template <typename T> | 130 | template <typename T> |
| 131 | class MPSCQueue { | 131 | class MPSCQueue { |
| 132 | public: | 132 | public: |
| 133 | std::size_t Size() const { | 133 | [[nodiscard]] std::size_t Size() const { |
| 134 | return spsc_queue.Size(); | 134 | return spsc_queue.Size(); |
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | bool Empty() const { | 137 | [[nodiscard]] bool Empty() const { |
| 138 | return spsc_queue.Empty(); | 138 | return spsc_queue.Empty(); |
| 139 | } | 139 | } |
| 140 | 140 | ||
| 141 | T& Front() const { | 141 | [[nodiscard]] T& Front() const { |
| 142 | return spsc_queue.Front(); | 142 | return spsc_queue.Front(); |
| 143 | } | 143 | } |
| 144 | 144 | ||