File tree 1 file changed +2
-4
lines changed
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -29,14 +29,12 @@ constexpr std::size_t MiB = KiB * KiB;
29
29
#ifdef _WIN32
30
30
auto make_arena (std::align_val_t align, size_t size) -> std::shared_ptr<std::byte>
31
31
{
32
- return std::shared_ptr<std::byte>(static_cast <std::byte*>(_aligned_malloc (size, static_cast <size_t >(align))),
33
- &_aligned_free);
32
+ return {static_cast <std::byte*>(_aligned_malloc (size, static_cast <size_t >(align))), &_aligned_free};
34
33
}
35
34
#else
36
35
auto make_arena (std::align_val_t align, size_t size) -> std::shared_ptr<std::byte>
37
36
{
38
- return std::shared_ptr<std::byte>(static_cast <std::byte*>(std::aligned_alloc (static_cast <size_t >(align), size)),
39
- &std::free);
37
+ return {static_cast <std::byte*>(std::aligned_alloc (static_cast <size_t >(align), size)), &std::free};
40
38
}
41
39
#endif
42
40
You can’t perform that action at this time.
0 commit comments