Skip to content

Main - New Macros: QADDON, QQADDON#1757

Merged
PabstMirror merged 4 commits intoCBATeam:masterfrom
OverlordZorn:QADDON
Jun 2, 2025
Merged

Main - New Macros: QADDON, QQADDON#1757
PabstMirror merged 4 commits intoCBATeam:masterfrom
OverlordZorn:QADDON

Conversation

@OverlordZorn
Copy link
Copy Markdown
Contributor

@OverlordZorn OverlordZorn commented May 1, 2025

Introduces QADDON and QQADDON

#ifndef QADDON
    #define QADDON QUOTE(ADDON)
#endif
#ifndef QQADDON
    #define QQADDON QUOTE(QUOTE(ADDON))
#endif

happy to add more when suggested

@OverlordZorn OverlordZorn changed the title Main - New Macros: Q(), QQ(), QADDON, QQADDON Main - New Macros: Q, QQ, QADDON, QQADDON May 1, 2025
@PabstMirror
Copy link
Copy Markdown
Contributor

I'm a little worried about conflicting with existing macros in older code, mainly with Q

@OverlordZorn
Copy link
Copy Markdown
Contributor Author

OverlordZorn commented May 1, 2025

I'm a little worried about conflicting with existing macros in older code, mainly with Q

was Q() used differently in the past?

I searched CBA and ace and didnt find any macro thats defined that way.

I can make each a #ifndef if needed or #ifdef #undef #define

@jokoho48
Copy link
Copy Markdown
Member

jokoho48 commented May 2, 2025

I don't think any of those macros are useful. If a mod itself wants them, they could always define them. This is just obscuring things it too much from my POV.

@OverlordZorn
Copy link
Copy Markdown
Contributor Author

OverlordZorn commented May 2, 2025

I don't think any of those macros are useful. If a mod itself wants them, they could always define them. This is just obscuring things it too much from my POV.

Just my opinion but cba already using Q in macro's like QGVAR/QQGVAR etc.for me its simply the most logical step to fill the gap and actually implement Q/QQ by itself as well as combined with others like QADDON

@Drofseh
Copy link
Copy Markdown
Contributor

Drofseh commented May 2, 2025

I don't see the point in shortening the general QUOTE to Q, I think it'll be less readable and the 4 character space savings don't matter.

I could see doing QADDON though, in the same way as QGVAR, as
#define QADDON QUOTE(ADDON)

@OverlordZorn OverlordZorn changed the title Main - New Macros: Q, QQ, QADDON, QQADDON Main - New Macros: QADDON, QQADDON May 12, 2025
@OverlordZorn
Copy link
Copy Markdown
Contributor Author

OverlordZorn commented May 12, 2025

moved Q,QQ into seperate PR #1759

@BrettMayson
Copy link
Copy Markdown
Contributor

probably should've moved these ADDON macros to another PR, so the comments regarding Q, QQ stayed relevant

@OverlordZorn
Copy link
Copy Markdown
Contributor Author

probably should've moved these ADDON macros to another PR, so the comments regarding Q, QQ stayed relevant

fair enough, but now this one at least has some momentum and gets merged maybe

@PabstMirror PabstMirror added this to the 3.18.4 milestone Jun 2, 2025
@PabstMirror PabstMirror merged commit 2292fff into CBATeam:master Jun 2, 2025
4 checks passed
@OverlordZorn OverlordZorn deleted the QADDON branch July 7, 2025 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants