SOPHIA_ASSERT
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include "render_context.hpp"
|
||||
|
||||
#include <cassert>
|
||||
#include <limits>
|
||||
#include <sophia/util/assert.hpp>
|
||||
#include <sophia/util/logger.hpp>
|
||||
#include <stdexcept>
|
||||
|
||||
@@ -16,8 +16,8 @@ RenderContext::RenderContext(Window& window, Device& device)
|
||||
RenderContext::~RenderContext() { this->device.waitIdle(); }
|
||||
|
||||
vk::CommandBuffer RenderContext::beginFrame() {
|
||||
assert(!this->isFrameStarted &&
|
||||
"Can't call beginFrame while already in progress");
|
||||
SOPHIA_ASSERT(!this->isFrameStarted,
|
||||
"Can't call beginFrame while already in progress");
|
||||
|
||||
FrameData& frame = this->frames[this->currentFrameIndex];
|
||||
|
||||
@@ -71,8 +71,8 @@ vk::CommandBuffer RenderContext::beginFrame() {
|
||||
}
|
||||
|
||||
void RenderContext::endFrame() {
|
||||
assert(this->isFrameStarted &&
|
||||
"Can't call endFrame while no frame is in progress");
|
||||
SOPHIA_ASSERT(this->isFrameStarted,
|
||||
"Can't call endFrame while no frame is in progress");
|
||||
|
||||
FrameData& frame = this->frames[this->currentFrameIndex];
|
||||
frame.commandBuffer.end();
|
||||
|
||||
Reference in New Issue
Block a user