mirror of
https://github.com/love2d/love.git
synced 2026-08-20 04:30:09 +02:00
Fix missing loveAssert
This commit is contained in:
@@ -27,6 +27,8 @@
|
|||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include "common/Exception.h"
|
||||||
|
|
||||||
b2Version b2_version = {2, 4, 0};
|
b2Version b2_version = {2, 4, 0};
|
||||||
|
|
||||||
// Memory allocators. Modify these to use your own allocator.
|
// Memory allocators. Modify these to use your own allocator.
|
||||||
@@ -46,6 +48,12 @@ void b2Log_Default(const char* string, va_list args)
|
|||||||
vprintf(string, args);
|
vprintf(string, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void loveAssert(bool test, const char* teststr)
|
||||||
|
{
|
||||||
|
if (!test)
|
||||||
|
throw love::Exception("Box2D assertion failed: %s", teststr);
|
||||||
|
}
|
||||||
|
|
||||||
FILE* b2_dumpFile = nullptr;
|
FILE* b2_dumpFile = nullptr;
|
||||||
|
|
||||||
void b2OpenDump(const char* fileName)
|
void b2OpenDump(const char* fileName)
|
||||||
|
|||||||
Reference in New Issue
Block a user