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 some warnings #235

Merged
merged 1 commit into from
Feb 20, 2023

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
@@ -231,7 +231,7 @@ struct WindowContext {
lastCursor = ImGuiMouseCursor_COUNT;

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.

@@ -1164,7 +1168,7 @@ void RenderDrawLists(ImDrawData* draw_data) {
}

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