Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for non-standard Assert-enabling macro #597

Open
grahamboree opened this issue Dec 27, 2022 · 0 comments
Open

Allow for non-standard Assert-enabling macro #597

grahamboree opened this issue Dec 27, 2022 · 0 comments

Comments

@grahamboree
Copy link
Member

grahamboree commented Dec 27, 2022

Currently rcAssert is disabled if NDEBUG is defined. It's often useful, however, to have non-debug builds that have asserts enabled.

To allow for this kind of flexibility in usage, rcAssert should be defined based on a Recast-specific preprocessor declaration, rather than a standardized one like this. Something like RC_ENABLE_ASSERTS

#ifdef NDEBUG
// From http://cnicholson.net/2009/02/stupid-c-tricks-adventures-in-assert/
# define rcAssert(x) do { (void)sizeof(x); } while((void)(__LINE__==-1),false)
#else

@grahamboree grahamboree self-assigned this Dec 27, 2022
@grahamboree grahamboree added this to the 2.0.0 milestone Jul 4, 2023
@grahamboree grahamboree removed their assignment Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant