Skip to content

[Examples] Warning fixes (pt 1)#1668

Merged
raysan5 merged 2 commits intoraysan5:masterfrom
JeffM2501:example_warning_fixes
Mar 23, 2021
Merged

[Examples] Warning fixes (pt 1)#1668
raysan5 merged 2 commits intoraysan5:masterfrom
JeffM2501:example_warning_fixes

Conversation

@JeffM2501
Copy link
Contributor

This PR fixes warnings in several examples in visual studio 2019

Color ballColor = BEIGE;

int touchCounter = 0;
float touchCounter = 0;
Copy link
Owner

Choose a reason for hiding this comment

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

Why it should be a float? It's just a counter...

// Draw RenderTexture2D to window, properly scaled
DrawTexturePro(target.texture, (Rectangle){ 0.0f, 0.0f, (float)target.texture.width, (float)-target.texture.height },
(Rectangle){ (GetScreenWidth() - ((float)gameScreenWidth*scale))*0.5, (GetScreenHeight() - ((float)gameScreenHeight*scale))*0.5,
(Rectangle){ (GetScreenWidth() - ((float)gameScreenWidth*scale))*0.5, (GetScreenHeight() - ((float)gameScreenHeight*scale))*0.5f,
Copy link
Owner

Choose a reason for hiding this comment

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

Probably the width multiplier should also be 0.5f.

Model model1 = LoadModelFromMesh(torus);

Mesh cube = GenMeshCube(.8,.8,.8);
Mesh cube = GenMeshCube(.8f,.8f,.8f);
Copy link
Owner

Choose a reason for hiding this comment

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

Oh, I didn't see those ones before, could you change them to:

Mesh cube = GenMeshCube(0.8f, 0.8f, 0.8f);

int colorSelectedPrev = colorSelected;
int colorMouseHover = 0;
int brushSize = 20;
float brushSize = 20;
Copy link
Owner

Choose a reason for hiding this comment

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

Probably it should be 20.0f

@raysan5
Copy link
Owner

raysan5 commented Mar 22, 2021

@JeffM2501 Thanks for the review, added some comments.

@raysan5 raysan5 merged commit e48b9a6 into raysan5:master Mar 23, 2021
@raysan5
Copy link
Owner

raysan5 commented Mar 23, 2021

@JeffM2501 Thanks for the review!

@JeffM2501 JeffM2501 deleted the example_warning_fixes branch May 3, 2024 04:35
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