diff options
author | Chris Robinson <chris.kcat@gmail.com> | 2023-12-26 22:37:12 -0800 |
---|---|---|
committer | Chris Robinson <chris.kcat@gmail.com> | 2023-12-26 22:37:12 -0800 |
commit | 205a73876234c0b1363189306530ada73ece56f2 (patch) | |
tree | 185ccb4d06ba136e4fee84324c6f1102c184734d /common/flexarray.h | |
parent | 1fddc044ac765d00e64628e59edcbcd71f0046b1 (diff) |
Try to start being a bit more pointer-owner conscious
Diffstat (limited to 'common/flexarray.h')
-rw-r--r-- | common/flexarray.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/flexarray.h b/common/flexarray.h index 9b6fcc63..7975a52a 100644 --- a/common/flexarray.h +++ b/common/flexarray.h @@ -74,7 +74,7 @@ struct FlexArray { { return Storage_t_::Sizeof(count, base); } static std::unique_ptr<FlexArray> Create(index_type count) { - if(void *ptr{al_calloc(alignof(FlexArray), Sizeof(count))}) + if(gsl::owner<void*> ptr{al_calloc(alignof(FlexArray), Sizeof(count))}) { try { return std::unique_ptr<FlexArray>{::new(ptr) FlexArray{count}}; @@ -87,7 +87,7 @@ struct FlexArray { throw std::bad_alloc(); } - FlexArray(index_type size) noexcept(std::is_nothrow_constructible_v<Storage_t_>) + FlexArray(index_type size) noexcept(std::is_nothrow_constructible_v<Storage_t_,index_type>) : mStore{size} { } ~FlexArray() = default; |