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

Refactor Mixer signal #552

Merged
merged 5 commits into from
Mar 26, 2020
Merged

Refactor Mixer signal #552

merged 5 commits into from
Mar 26, 2020

Conversation

DanRStevens
Copy link
Collaborator

Reference: #528 (-Wmissing-variable-declarations)

Refactor MixerSDL event handling, and limit scope of file level variable to fix warning.

Switch to using the common "onX" name for event handlers.
Name signal after what it represents, and keep type out of the name.
This limits visibility and potential for name conflict.

Fixes Clang warning for flag `-Wmissing-variable-declarations`.
It seems slightly cleaner to setup event handling before asking the SDL
Mixer subsystem to start delivering events. Similarly we should ask the
SDL Mixer subsystem to stop delivering events before we remove the event
handlers.

Not that it really matters though, since the Signal class is safe to
call when there are no handlers setup to delegate to.
@DanRStevens DanRStevens requested a review from cugone March 26, 2020 02:49
@DanRStevens DanRStevens merged commit 46376e0 into master Mar 26, 2020
@DanRStevens DanRStevens deleted the refactorMixerSignal branch March 26, 2020 03:34
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