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

chore(MY_CLASS): add parentheses to MY_CLASS definition #5485

Merged
merged 4 commits into from
Jan 26, 2024

Conversation

W-Mai
Copy link
Contributor

@W-Mai W-Mai commented Jan 25, 2024

Description of the feature or fix

When I'm trying to use

#define MY_CLASS &XXXXXX

MY_CLASS->width_def
// or
MY_CLASS.width_def

I suddenly found that I couldn't use it like this, because the macro written in this way was replaced with &XXXX->width_def, that is, &(XXXX->width_def), and if I used it . to replace -> is also wrong, and it is not right anyway.

At this time, I suddenly realized that I should add a parentheses to it.

#define MY_CLASS (&XXXXX)

// so MY_CLASS->xxxxx will be replaced with
(&XXXXXX)->xxxxx

That's all right!

Notes

XuNeo
XuNeo previously approved these changes Jan 25, 2024
@kisvegabor kisvegabor merged commit 56cd592 into lvgl:master Jan 26, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants