From 9fa8aa034aa0e62904fd1a94795ca7b8c5249b08 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Tue, 27 Sep 2022 14:10:42 +0200 Subject: [PATCH] Add a size function to the stream wrapper --- src/common/serialization/clap/stream.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/common/serialization/clap/stream.h b/src/common/serialization/clap/stream.h index bb73a4d9..f6ce0785 100644 --- a/src/common/serialization/clap/stream.h +++ b/src/common/serialization/clap/stream.h @@ -45,6 +45,11 @@ class Stream { */ Stream(const clap_istream_t& original); + /** + * The buffer's size in bytes, used for logging. + */ + inline size_t size() const noexcept { return buffer_.size(); } + /** * Get a `clap_ostream_t` for this buffer that the plugin can write to. This * is only valid as long as this object is not moved.