diff options
Diffstat (limited to 'deimos/core/temp_allocator.cpp')
-rw-r--r-- | deimos/core/temp_allocator.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
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<void*>(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;
}
};
|