diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2025-01-02 18:19:38 +0100 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2025-01-02 18:19:38 +0100 |
commit | c9fef8d83fe48f233372b890fcfd184ef68a9b69 (patch) | |
tree | 0c1825a180288c38a11ba4e644bd1a6b3151f906 /asl/buffer.hpp | |
parent | 7e66d8e7e50060553be837b021aef1d83d0252bd (diff) |
Add assertion failure handler
Diffstat (limited to 'asl/buffer.hpp')
-rw-r--r-- | asl/buffer.hpp | 2 |
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;
|