macro_rules! SDL_enabled_assert {
($condition:expr) => { ... };
}Expand description
The macro used when an assertion is enabled.
This isn’t for direct use by apps, but this is the code that is inserted
when an SDL_assert is enabled.
The do {} while(0) avoids dangling else problems:
if (x) SDL_assert(y); else blah();… without the do/while, the “else” could attach to this macro’s “if”. We
try to handle just the minimum we need here in a macro…the loop, the
static vars, and break points. The heavy lifting is handled in
SDL_ReportAssertion().
§Parameters
condition: the condition to assert.
§Availability
This macro is available since SDL 3.2.0.