[ox/fs] Cleanup unnecessary reinterpret_casts
This commit is contained in:
parent
0d368b3c02
commit
959f75d2db
6
deps/ox/src/ox/fs/ptrarith/nodebuffer.hpp
vendored
6
deps/ox/src/ox/fs/ptrarith/nodebuffer.hpp
vendored
@ -173,16 +173,14 @@ class OX_PACKED NodeBuffer {
|
||||
template<typename size_t, typename Item>
|
||||
NodeBuffer<size_t, Item>::NodeBuffer(size_t size) noexcept {
|
||||
m_header.size = size;
|
||||
auto data = reinterpret_cast<uint8_t*>(this) + sizeof(*this);
|
||||
ox_memset(data, 0, size - sizeof(*this));
|
||||
ox_memset(this + 1, 0, size - sizeof(*this));
|
||||
oxTrace("ox::NodeBuffer::constructor") << m_header.firstItem;
|
||||
}
|
||||
|
||||
template<typename size_t, typename Item>
|
||||
NodeBuffer<size_t, Item>::NodeBuffer(const NodeBuffer &other, size_t size) noexcept {
|
||||
oxTracef("ox::ptrarith::NodeBuffer::copy", "other.m_header.firstItem: {}", other.m_header.firstItem.get());
|
||||
auto data = reinterpret_cast<uint8_t*>(this) + sizeof(*this);
|
||||
ox_memset(data, 0, size - sizeof(*this));
|
||||
ox_memset(this + 1, 0, size - sizeof(*this));
|
||||
ox_memcpy(this, &other, size);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user