Skip to content

Conversation

@vittorioromeo
Copy link
Member

Fixes various warnings, including: "unhandled values in switch", "implicit conversion from signed to unsigned".

@vittorioromeo vittorioromeo force-pushed the feature/fix_some_warnings branch from a9e8cd6 to eae0246 Compare February 20, 2023 21:44

joystickId = getConnectedJoystickId();
for (int i = 0; i < sf::Joystick::ButtonCount; ++i) {
for (int i = 0; i < static_cast<int>(sf::Joystick::ButtonCount); ++i) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like an SFML/SFML bug we ought to fix. We shouldn't use a signed int for a count like this. But that's outside the scope of this PR.


ImGuiIO& io = ImGui::GetIO();
assert(io.Fonts->TexID != (ImTextureID)NULL); // You forgot to create and set font texture
assert(io.Fonts->TexID != (ImTextureID) nullptr); // You forgot to create and set font texture
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we even need to do that cast to ImTextureID? Maybe that's out of scope of this PR though.

Copy link
Contributor

@eliasdaler eliasdaler Feb 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this cast was needed to calm down some other compiler warnings :)
(Well, I found this.)

@vittorioromeo vittorioromeo merged commit f0d8f72 into SFML:master Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants