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

Docs: show enum and bitflag values in comments only for special values #500

Merged
merged 2 commits into from
Jan 21, 2025

Conversation

kainino0x
Copy link
Collaborator

Generally users shouldn't be particularly interested in the numeric values of enums and bitflags except for special cases. It makes more sense to highlight those so they stick out, rather than blending into the noise.

  • Undefined=0 / BindingNotUsed=0, because it's what you get from zero-init
  • Undefined=1, because it's an exception to the usual
  • Bitflags that are 0 or combinations (All=Red|Green|Blue|Alpha)

@kainino0x kainino0x requested a review from lokokung January 17, 2025 19:49
@kainino0x kainino0x enabled auto-merge (squash) January 21, 2025 21:22
@kainino0x kainino0x merged commit f93a367 into webgpu-native:main Jan 21, 2025
5 checks passed
@kainino0x kainino0x deleted the enum-and-bit-comments branch January 21, 2025 21:25
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.

2 participants