Util: Add CompressHelpers

This commit is contained in:
Stenzek
2024-08-26 21:27:30 +10:00
parent 2c27b20090
commit ae2e79f401
6 changed files with 325 additions and 0 deletions

View File

@ -195,6 +195,19 @@ public:
m_size = 0;
}
}
DynamicHeapArray(const std::span<const T> data)
{
if (!data.empty())
{
internal_resize(data.size(), nullptr, 0);
std::memcpy(m_data, data.data(), sizeof(T) * data.size());
}
else
{
m_data = nullptr;
m_size = 0;
}
}
DynamicHeapArray(const this_type& copy)
{