summaryrefslogtreecommitdiff
path: root/deimos/core/temp_allocator.cpp
diff options
context:
space:
mode:
authorSteven Le Rouzic <steven.lerouzic@gmail.com>2024-04-27 01:16:21 +0200
committerSteven Le Rouzic <steven.lerouzic@gmail.com>2024-04-27 01:16:21 +0200
commite02f9fd89b059919baf3a8d8bf8b783470976a27 (patch)
tree6bb16cce1231dba9b0eab5f43ceb7c5d86f8e7cb /deimos/core/temp_allocator.cpp
parent08eece258ceff7824250454906bff013a7303c28 (diff)
Some work on Vulkan initialization
Diffstat (limited to 'deimos/core/temp_allocator.cpp')
-rw-r--r--deimos/core/temp_allocator.cpp12
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;
}
};