summaryrefslogtreecommitdiff
path: root/asl/buffer.hpp
diff options
context:
space:
mode:
authorSteven Le Rouzic <steven.lerouzic@gmail.com>2025-01-02 18:19:38 +0100
committerSteven Le Rouzic <steven.lerouzic@gmail.com>2025-01-02 18:19:38 +0100
commitc9fef8d83fe48f233372b890fcfd184ef68a9b69 (patch)
tree0c1825a180288c38a11ba4e644bd1a6b3151f906 /asl/buffer.hpp
parent7e66d8e7e50060553be837b021aef1d83d0252bd (diff)
Add assertion failure handler
Diffstat (limited to 'asl/buffer.hpp')
-rw-r--r--asl/buffer.hpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/asl/buffer.hpp b/asl/buffer.hpp
index 276222d..a616011 100644
--- a/asl/buffer.hpp
+++ b/asl/buffer.hpp
@@ -114,6 +114,8 @@ private:
// NOLINTNEXTLINE(*-rvalue-reference-param-not-moved)
void move_from_other(buffer&& other)
{
+ ASL_ASSERT(size() == 0 && !is_on_heap());
+
if (other.is_on_heap())
{
m_data = other.m_data;