mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Add SRB2_ASSERT, superceding I_Assert This assertion macro always expands to a call of srb2::do_assert, which is overloaded with two templates: one which applies if the provided Level is less than or equal to the SRB2_ASSERTION_LEVEL, and one which is a no-op. When optimizations are enabled, this will verifiably remove the evaluation of the expression in all cases, instead of evaluating the expression and doing nothing with it. Add srb2::NotNull wrapper utility This is meant to be used in places where pointers are used as parameters. It can be used with any pointer-like type, not just raw pointers. During construction of NotNull, the pointer will be asserted not-null in debug and paranoia builds, and in release optimizations with no assertions, the code decays gracefully to standard pointer-passing.
6 lines
164 B
C++
6 lines
164 B
C++
#ifndef __SRB2_TESTS_TESTBASE_HPP__
|
|
#define __SRB2_TESTS_TESTBASE_HPP__
|
|
|
|
#define SRB2_ASSERT_HANDLER srb2::NoOpAssertHandler
|
|
|
|
#endif // __SRB2_TESTS_TESTBASE_HPP__
|