first commit

This commit is contained in:
2026-06-22 11:49:35 +02:00
commit d805f2ba86
619 changed files with 126873 additions and 0 deletions

View File

@ -0,0 +1,35 @@
/* -----------------------------------------------------------------------------
GSFramework
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */
#ifndef __NASSERT__
#define __NASSERT__
namespace GS {
namespace Assert {
/// Trigger a system assertion.
extern void Trigger(const char *source, int line, const char *condition, const char *message = 0);
} // Assert
} // GS
// Portable assert.
#ifdef _DEBUG
#define __ASSERT__(_EXP_) if (!(_EXP_)) GS::Assert::Trigger(__FILE__, __LINE__, #_EXP_)
#define __ASSERT_MSG__(_EXP_, _MSG_) if (!(_EXP_)) GS::Assert::Trigger(__FILE__, __LINE__, #_EXP_, _MSG_)
#define __ASSERT_ALWAYS__ GS::Assert::Trigger(__FILE__, __LINE__, "Unconditional")
#else
#define __ASSERT__(_EXP_)
#define __ASSERT_MSG__(_EXP_, _MSG_)
#define __ASSERT_ALWAYS__
#endif
#define __RASSERT__(_EXP_) if (!(_EXP_)) GS::Assert::Trigger(__FILE__, __LINE__, #_EXP_)
#define __RASSERT_MSG__(_EXP_, _MSG_) if (!(_EXP_)) GS::Assert::Trigger(__FILE__, __LINE__, #_EXP_, _MSG_)
#endif // __NASSERT__