0
0
Fork 0
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:
Jason Volk 2022-03-25 19:02:02 -07:00
parent 2106263dd4
commit 6c443361bc

View file

@ -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>