-
Notifications
You must be signed in to change notification settings - Fork 148
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
add header for PREP() macro #1022
Conversation
addons/main/script_macros_common.hpp
Outdated
The PREP macro should be placed in a script run by a XEH preStart and XEH preInit event. | ||
|
||
The PREP macro allows for CBA function caching, which drastically speeds up load times. | ||
Beware though that function caching is enabled by default and as such to disable it you, need to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to disable it, you need
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -936,6 +962,13 @@ Macro: PATHTO_FNC() | |||
Author: | |||
dixon13, commy2 | |||
------------------------------------------- */ | |||
#ifdef RECOMPILE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now the PATHTO_FNC header looks like it applies to recompile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The alternative is having RECOMPILE
to look like it belongs to PREP
when it belongs to PATHTO_FNC
only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe move it below PATHTO_FNC then? So that the header is still directly above what it belongs to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PATHTO_FNC
uses RECOMPILE
. I think it would break the way you described.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Macro inside a different macro is only resolved when the second macro is used.
PATHTO_FNC is resolved first. Then the RECOMPILE inside it is resolved.
So it wouldn't cause any problems if it's defined after the PATHTO_FNC macro
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess. But it still would look weird.
When merged this pull request will: