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

Cleanup some functions headers and macro using #6866

Merged
merged 3 commits into from
Mar 20, 2019

Conversation

Dystopian
Copy link
Contributor

When merged this pull request will:

  • cleanup frisking (removed in Remove Frisk #1612);
  • cleanup header format;
  • cleanup some FUNC macro using.

@@ -67,7 +67,7 @@ class RscACE_SelectAnItem {
text = "";
};
class itemList: RscListBox {
onMouseButtonDblClick = "_this call ACE_Interaction_fnc_onSelectMenuDblClick";
onMouseButtonDblClick = QUOTE(_this call DFUNC(onSelectMenuDblClick));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all these calls in this file don't exist

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parent RscACE_SelectAnItem isn't used anywhere in ace
might be a remnant from agm

@PabstMirror PabstMirror added this to the 3.12.7 milestone Mar 17, 2019
@PabstMirror PabstMirror added the kind/cleanup Release Notes: **CHANGED:** label Mar 17, 2019
@commy2
Copy link
Contributor

commy2 commented Mar 17, 2019

Why DFUNC?

@PabstMirror
Copy link
Contributor

FUNC( isn't safe in configs
with callstack enabled

    #define FUNC(var1) {if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, 'TRIPLES(ADDON,fnc,var1)', _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = 'TRIPLES(ADDON,fnc,var1)'; private _ret = _this call TRIPLES(ADDON,fnc,var1); ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;}

defining it globablly actually crashes the game on load

        ADDON = QUOTE(call FUNC(createStaminaBar));
File z\ace\addons\advanced_fatigue\CfgEventHandlers.hpp, line 20: '/Extended_DisplayLoad_EventHandlers/RscDisplayMission.ace_advanced_fatigue': Missing ';' at the end of line
Error context hpp", 20, ACE_CURRENT_FUNCTION, 'ace_advanced_fatigue_fnc_createStaminaBar', _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = 'ace_advanced_fatigue_fnc_createStaminaBar'; private _ret = _this call ace_advanced_fatigue_fnc_createStaminaBar; ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;}";
ErrorMessage: File z\ace\addons\advanced_fatigue\CfgEventHandlers.hpp, line 20: '/Extended_DisplayLoad_EventHandlers/RscDisplayMission.CfgEventHandlers': '.' encountered instead of '='
Application terminated intentionally

I don't think many people are using callstack, so it's not a big deal

@jonpas
Copy link
Member

jonpas commented Mar 17, 2019

Callstack log doesn't even exist at the moment. :P

@PabstMirror PabstMirror merged commit d804d3a into acemod:master Mar 20, 2019
@Dystopian Dystopian deleted the fix_function_macro branch March 20, 2019 20:22
@PabstMirror PabstMirror modified the milestones: 3.12.7, 3.13.0 Jul 5, 2019
BaerMitUmlaut pushed a commit that referenced this pull request Aug 5, 2019
* Cleanup frisking

* Cleanup header format

* Cleanup FUNC macro using
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Release Notes: **CHANGED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants