mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 16:22:35 +01:00
ircd::buffer: Name some synthetic variables for debuggability.
This commit is contained in:
parent
2106263dd4
commit
6c443361bc
1 changed files with 4 additions and 2 deletions
|
@ -51,9 +51,10 @@ ircd::buffer::unique_buffer<buffer_type>::unique_buffer(const const_buffer &src)
|
|||
|
||||
assert(this->begin() != nullptr);
|
||||
assert(size(src) == size(*this));
|
||||
const auto ptr(std::get<0>(*this));
|
||||
const mutable_buffer dst
|
||||
{
|
||||
const_cast<char *>(this->begin()), size(src)
|
||||
const_cast<char *>(ptr), size(src)
|
||||
};
|
||||
|
||||
copy(dst, src);
|
||||
|
@ -99,7 +100,8 @@ inline
|
|||
ircd::buffer::unique_buffer<buffer_type>::~unique_buffer()
|
||||
noexcept
|
||||
{
|
||||
std::free(const_cast<char *>(this->begin()));
|
||||
const auto ptr(std::get<0>(*this));
|
||||
std::free(const_cast<char *>(ptr));
|
||||
}
|
||||
|
||||
template<class buffer_type>
|
||||
|
|
Loading…
Reference in a new issue