-
Notifications
You must be signed in to change notification settings - Fork 50
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
readbility #285
base: master
Are you sure you want to change the base?
readbility #285
Conversation
It improves readability.
Make everything explicit. Also improves readability. Done by clang-tidy.
Increased readability.
QPalette::ColorGroup colorGroup = (option.state & QStyle::State_Active) ? QPalette::Active : QPalette::Inactive; | ||
if (option.state & QStyle::State_Selected) // selected items | ||
QPalette::ColorGroup colorGroup = (option.state & QStyle::State_Active) != 0u ? QPalette::Active : QPalette::Inactive; | ||
if ((option.state & QStyle::State_Selected) != 0u) // selected items |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really doubt that substitutions like the above ones could make the code more readable (there are some in other places too). I'm afraid I wanted to say the same thing about too much usage of nullptr
but 0u
might feel strange to code readers — especially if they're contributors who want to preserve the code style.
That being said, if you prefer them, there will be no objection from me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will come back to you on this.
No description provided.