From e02f9fd89b059919baf3a8d8bf8b783470976a27 Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Sat, 27 Apr 2024 01:16:21 +0200 Subject: Some work on Vulkan initialization --- deimos/core/temp_allocator.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'deimos/core/temp_allocator.cpp') diff --git a/deimos/core/temp_allocator.cpp b/deimos/core/temp_allocator.cpp index d2b7900..99ee630 100644 --- a/deimos/core/temp_allocator.cpp +++ b/deimos/core/temp_allocator.cpp @@ -35,7 +35,6 @@ public: if (new_current > m_reserve_end) { deimos_Panic("Ran out of temporary memory"); - return nullptr; } if (new_current > m_commit_end) @@ -73,15 +72,8 @@ public: { void* rewind_base = std::bit_cast(tag.tag); Expects(rewind_base >= m_base && rewind_base <= m_commit_end); - - if (rewind_base < m_current) - { - m_current = rewind_base; - } - else - { - deimos_Panic("Invalid temporary allocator rewind"); - } + Expects(rewind_base <= m_current); + m_current = rewind_base; } }; -- cgit