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

Enums as constants? #1

Open
clearz opened this issue Feb 6, 2024 · 0 comments
Open

Enums as constants? #1

clearz opened this issue Feb 6, 2024 · 0 comments

Comments

@clearz
Copy link

clearz commented Feb 6, 2024

I'm wondering why you have moved the enums into the class scope as constants/static vars? Is it just a matter of having them all in the same scope?
This also has created some bugs due to how enums initialise the values of their members. e.g

public static SDL_EventType SDL_EVENT_FIRST = 0,
    SDL_EVENT_QUIT = (SDL_EventType)0x100,
    SDL_EVENT_TERMINATING,
    SDL_EVENT_LOW_MEMORY,
   ...

SDL_EVENT_TERMINATING and SDL_EVENT_LOW_MEMORY are initialised to zero where they should be 0x101 and 0x102.

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

No branches or pull requests

1 participant