1
0
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:
IntelOrca
2016-04-10 17:01:16 +01:00
committed by Ted John
parent e9bf2a742f
commit 4b2776f266
6 changed files with 65 additions and 35 deletions

24
src/core/Guard.cpp Normal file
View 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);
}
}