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

A string lookup should be provided for macros #249

Open
PathogenDavid opened this issue Oct 24, 2024 · 1 comment
Open

A string lookup should be provided for macros #249

PathogenDavid opened this issue Oct 24, 2024 · 1 comment
Labels
Area-Transformation Issues concerning Biohazrd transformations RelativelySmall Issues that are relatively small and could be good candidates for someone's first issue.

Comments

@PathogenDavid
Copy link
Member

Right now macros are organized in an immutable array, but it can be helpful to look them up by name without just evaluating them blindly.

We should consider providing a lazily-created ImmutableDictionary of them in addition to the array.

This came up when manually translating PortAudio's macro-style enums, which do not have identifying prefixes and had to be listed manually. (EG: PaSampleFormat)

On the flip side however, it might be kinda non-obvious why we offer both (iterating an array is valuable for certain libraries, IE: Win32.) Maybe the dictionary should only be internal?

@PathogenDavid PathogenDavid added Area-Transformation Issues concerning Biohazrd transformations RelativelySmall Issues that are relatively small and could be good candidates for someone's first issue. labels Oct 24, 2024
@PathogenDavid
Copy link
Member Author

Mochi.DearImGui's ImVersionConstantsTransformation would also benefit from this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Transformation Issues concerning Biohazrd transformations RelativelySmall Issues that are relatively small and could be good candidates for someone's first issue.
Projects
None yet
Development

No branches or pull requests

1 participant