From a6abeaaf3a68e3b7072f75acae4cfdf720ad20f4 Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Sat, 13 Apr 2024 00:11:04 +0200 Subject: Re-add gsl::owner on the Allocator API --- deimos/core/allocator.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'deimos/core/allocator.h') diff --git a/deimos/core/allocator.h b/deimos/core/allocator.h index 8f00610..e65f316 100644 --- a/deimos/core/allocator.h +++ b/deimos/core/allocator.h @@ -40,7 +40,7 @@ public: constexpr IAllocator* allocator() const { return m_allocator; } [[nodiscard]] - constexpr void* Allocate( + constexpr gsl::owner Allocate( int64_t new_size, const SourceLocation& source_location = {}) { @@ -48,15 +48,15 @@ public: } [[nodiscard]] - void* Reallocate( - void* old_ptr, int64_t old_size, int64_t new_size, + gsl::owner Reallocate( + gsl::owner old_ptr, int64_t old_size, int64_t new_size, const SourceLocation& source_location = {}) { return m_allocator->Reallocate(old_ptr, old_size, new_size, m_scope, source_location); } constexpr void Free( - void* old_ptr, int64_t old_size, + gsl::owner old_ptr, int64_t old_size, const SourceLocation& source_location = {}) { (void)m_allocator->Reallocate(old_ptr, old_size, 0, m_scope, source_location); -- cgit