util/PeakBuffer: add method max_size()

This commit is contained in:
Max Kellermann 2021-01-21 16:44:11 +01:00
parent eea0e084af
commit 056ab199ab
1 changed files with 4 additions and 0 deletions

View File

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