rsx/util: Support basic array merge

This commit is contained in:
kd-11 2025-06-15 22:04:57 +03:00 committed by kd-11
parent 3a65359d59
commit bb1c0a5eee
2 changed files with 32 additions and 0 deletions

View file

@ -285,6 +285,13 @@ namespace rsx
return pos;
}
void operator += (const rsx::simple_array<Ty>& that)
{
const auto old_size = _size;
resize(_size + that._size);
std::memcpy(data() + old_size, that.data(), that.size_bytes());
}
void clear()
{
_size = 0;