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

Fix NONE, ALL, EVAL macros to stop wrongly applying to same-named enums #27132

Merged
merged 1 commit into from
May 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Marlin/src/core/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@
#define ENABLED(V...) DO(ENA,&&,V)
#define DISABLED(V...) DO(DIS,&&,V)
#define ANY(V...) !DISABLED(V)
#define ALL ENABLED
#define NONE DISABLED
#define ALL(V...) ENABLED(V)
#define NONE(V...) DISABLED(V)
#define COUNT_ENABLED(V...) DO(ENA,+,V)
#define MANY(V...) (COUNT_ENABLED(V) > 1)

Expand Down Expand Up @@ -630,7 +630,7 @@
#define DEFER4(M) M EMPTY EMPTY EMPTY EMPTY()()()()

// Force define expansion
#define EVAL EVAL16
#define EVAL(V...) EVAL16(V)
#define EVAL4096(V...) EVAL2048(EVAL2048(V))
#define EVAL2048(V...) EVAL1024(EVAL1024(V))
#define EVAL1024(V...) EVAL512(EVAL512(V))
Expand Down
Loading