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

The defines in gravity_optionals.h are Always Defined #426

Open
jockm opened this issue Jul 8, 2024 · 0 comments
Open

The defines in gravity_optionals.h are Always Defined #426

jockm opened this issue Jul 8, 2024 · 0 comments

Comments

@jockm
Copy link

jockm commented Jul 8, 2024

In optionals gravity_optionals.h you will find the following (lines 12-14):

#ifndef GRAVITY_INCLUDE_MATH
#define GRAVITY_INCLUDE_MATH
#endif

So if moth hasn't been defined, then math is defined, if you use optionals, which are included by default. So the mere act of including gravity_optionals.h forces math to be included.

This is also true of GRAVITY_INCLUDE_JSON, GRAVITY_INCLUDE_ENV, and GRAVITY_INCLUDE_FILE

If they aren't optional, then there is no need for the #ifdefs, if they are optional then you shouldn't force them. Either way this should probably be changed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant