Attempting to use an external library to handle bitstreams. Isn't going the grreatest.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef BS_DEBUG_BREAK
|
||||
#if defined(_WIN32) // Windows
|
||||
#define BS_BREAKPOINT() __debugbreak()
|
||||
#elif defined(__linux__) // Linux
|
||||
#include <csignal>
|
||||
#define BS_BREAKPOINT() std::raise(SIGTRAP)
|
||||
#else // Non-supported
|
||||
#define BS_BREAKPOINT() throw
|
||||
#endif
|
||||
|
||||
#define BS_ASSERT(...) if (!(__VA_ARGS__)) { BS_BREAKPOINT(); return false; }
|
||||
#else // BS_DEBUG_BREAK
|
||||
#define BS_ASSERT(...) if (!(__VA_ARGS__)) { return false; }
|
||||
|
||||
#define BS_BREAKPOINT() throw
|
||||
#endif // BS_DEBUG_BREAK
|
||||
Reference in New Issue
Block a user