From e3f94e66229ef0943ec4a46086abb6721e0dc715 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Wed, 4 Sep 2024 22:17:35 +0200 Subject: [PATCH] nodiscard --- server/proxy/modules/bitmap-filter/bitmap-filter.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/proxy/modules/bitmap-filter/bitmap-filter.cpp b/server/proxy/modules/bitmap-filter/bitmap-filter.cpp index 3969cf1ad..5269dc881 100644 --- a/server/proxy/modules/bitmap-filter/bitmap-filter.cpp +++ b/server/proxy/modules/bitmap-filter/bitmap-filter.cpp @@ -62,12 +62,12 @@ class DynChannelState { public: - bool skip() const + [[nodiscard]] bool skip() const { return _toSkip != 0; } - bool skip(size_t s) + [[nodiscard]] bool skip(size_t s) { if (s > _toSkip) _toSkip = 0; @@ -76,12 +76,12 @@ class DynChannelState return skip(); } - size_t remaining() const + [[nodiscard]] size_t remaining() const { return _toSkip; } - size_t total() const + [[nodiscard]] size_t total() const { return _totalSkipSize; } @@ -91,7 +91,7 @@ class DynChannelState _toSkip = _totalSkipSize = len; } - bool drop() const + [[nodiscard]] bool drop() const { return _drop; } @@ -101,7 +101,7 @@ class DynChannelState _drop = d; } - uint32_t channelId() const + [[nodiscard]] uint32_t channelId() const { return _channelId; }