MCPcopy Create free account
hub / github.com/Simple-XX/SimpleKernel / operator=

Method operator=

src/io_buffer.cpp:34–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34auto 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
48auto IoBuffer::GetBuffer() const -> std::span<const uint8_t> {
49 return {data_, size_};

Callers

nothing calls this directly

Calls 1

aligned_freeFunction · 0.50

Tested by

no test coverage detected