summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2021-01-21 16:44:11 +0100
committerMax Kellermann <max@musicpd.org>2021-01-21 16:45:56 +0100
commit056ab199abb302297529812834e4f36a1d91149c (patch)
treeba9d5c84c82e37bf49754872e44f0c4b0b19e034 /src
parenteea0e084afec4049ba94c2745e3d2f9ec959f814 (diff)
util/PeakBuffer: add method max_size()
Diffstat (limited to 'src')
-rw-r--r--src/util/PeakBuffer.hxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util/PeakBuffer.hxx b/src/util/PeakBuffer.hxx
index c3d871035..febf8bd73 100644
--- a/src/util/PeakBuffer.hxx
+++ b/src/util/PeakBuffer.hxx
@@ -55,6 +55,10 @@ public:
PeakBuffer(const PeakBuffer &) = delete;
PeakBuffer &operator=(const PeakBuffer &) = delete;
+ std::size_t max_size() const noexcept {
+ return normal_size + peak_size;
+ }
+
gcc_pure
bool empty() const noexcept;