From 51eedf2b1628f0cd3ff7af2c2e9c6f5aa87e260f Mon Sep 17 00:00:00 2001 From: apio Date: Tue, 18 Apr 2023 16:40:37 +0200 Subject: [PATCH] Buffer: Add an is_empty() method --- libluna/include/luna/Buffer.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libluna/include/luna/Buffer.h b/libluna/include/luna/Buffer.h index 554de586..54b0fc46 100644 --- a/libluna/include/luna/Buffer.h +++ b/libluna/include/luna/Buffer.h @@ -46,6 +46,11 @@ class Buffer return m_size; } + bool is_empty() const + { + return m_size == 0; + } + private: Buffer(u8* data, usize size);