mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add util::Buffer copy constructor
This commit is contained in:
parent
9badc0a022
commit
f05ed4942d
1 changed files with 1 additions and 0 deletions
|
|
@ -12,6 +12,7 @@ namespace util {
|
|||
Buffer(size_t length)
|
||||
: ptr(std::make_unique<T[]>(length)), length(length) {
|
||||
}
|
||||
Buffer(const Buffer<T>& o) : Buffer(o.data(), o.size()) {}
|
||||
|
||||
Buffer(std::unique_ptr<T[]> ptr, size_t length)
|
||||
: ptr(std::move(ptr)), length(length) {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue