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

Fix MSVC warnings in controls\* #6866

Merged
merged 1 commit into from
Dec 17, 2023
Merged

Conversation

obligaron
Copy link
Contributor

This PR reduces warnings by 15 (from 32 to 17)

Changes are

  • when using round cast to int
  • avoid switches with only default-case (warning C4065; switch statement contains 'default' but no 'case' labels)

The C4065 warning was a bit annoying, as I think the old syntax is fine.
This PR will wrap each switch with another `#ifdef' to see if there is a case present.
An alternative fix would be to ignore the warning. So if we think this is better, we can change the PR.

Note: I haven't been able to test this PR because I don't own a joystick, let alone a device which enables the defines.

@AJenbo AJenbo merged commit c8b8996 into diasurgical:master Dec 17, 2023
22 of 23 checks passed
@obligaron obligaron deleted the cwarning branch December 17, 2023 15:03
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.

3 participants