| 32 | } |
| 33 | |
| 34 | auto IoBuffer::operator=(IoBuffer&& other) noexcept -> IoBuffer& { |
| 35 | assert(this != &other && "Self-move assignment is not allowed"); |
| 36 | |
| 37 | if (data_ != nullptr) { |
| 38 | aligned_free(data_); |
| 39 | } |
| 40 | data_ = other.data_; |
| 41 | size_ = other.size_; |
| 42 | other.data_ = nullptr; |
| 43 | other.size_ = 0; |
| 44 | |
| 45 | return *this; |
| 46 | } |
| 47 | |
| 48 | auto IoBuffer::GetBuffer() const -> std::span<const uint8_t> { |
| 49 | return {data_, size_}; |
nothing calls this directly
no test coverage detected