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

Pass functions by reference to BI event handlers #6368

Merged
merged 1 commit into from
May 30, 2018

Conversation

mharis001
Copy link
Member

When merged this pull request will:

  • Pass functions by reference to addEventHandler and addMissionEventHandler
    Should provide a slight performance improvement

@PabstMirror PabstMirror added the kind/enhancement Release Notes: **IMPROVED:** label May 26, 2018
@PabstMirror PabstMirror added this to the 3.13.0 milestone May 26, 2018
@654wak654
Copy link
Contributor

Isn't this what the LINKFUNC macro already does?

@dedmen
Copy link
Contributor

dedmen commented May 26, 2018

#ifdef DISABLE_COMPILE_CACHE
#define LINKFUNC(x) {_this call FUNC(x)}
#define PREP_RECOMPILE_START if (isNil "ACE_PREP_RECOMPILE") then {ACE_RECOMPILES = []; ACE_PREP_RECOMPILE = {{call _x} forEach ACE_RECOMPILES;}}; private _recomp = {
#define PREP_RECOMPILE_END }; call _recomp; ACE_RECOMPILES pushBack _recomp;
#else
#define LINKFUNC(x) FUNC(x)
#define PREP_RECOMPILE_START /* */
#define PREP_RECOMPILE_END /* */
#endif

@commy2
Copy link
Contributor

commy2 commented May 26, 2018

Btw, LINKFUNC() should be changed to {call FUNC()}.

@PabstMirror PabstMirror merged commit 232f986 into acemod:master May 30, 2018
@mharis001 mharis001 deleted the pass-by-reference branch June 10, 2018 15:55
@PabstMirror PabstMirror modified the milestones: 3.13.0, 3.12.3 Jul 5, 2018
BaerMitUmlaut pushed a commit that referenced this pull request Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants