mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-21 05:53:02 +01:00
move code from Diagnostics and Guard to cpp
This commit is contained in:
24
src/core/Guard.cpp
Normal file
24
src/core/Guard.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#include <cassert>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "Console.hpp"
|
||||
#include "Diagnostics.hpp"
|
||||
#include "Guard.hpp"
|
||||
|
||||
namespace Guard
|
||||
{
|
||||
void Assert(bool expression, const char * message)
|
||||
{
|
||||
if (expression) return;
|
||||
|
||||
if (message != nullptr)
|
||||
{
|
||||
Console::Error::WriteLine(message);
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
Debug::Break();
|
||||
#endif
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user