From 6cd37e57a6b38bb06cc54ecf6aa7659d4895723b Mon Sep 17 00:00:00 2001 From: Jeffery Myers Date: Mon, 6 Nov 2023 11:31:07 -0800 Subject: Fix warnings in visual studio (#3512) --- examples/core/core_2d_camera_split_screen.c | 8 ++++---- examples/core/core_drop_files.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'examples/core') diff --git a/examples/core/core_2d_camera_split_screen.c b/examples/core/core_2d_camera_split_screen.c index 57a0dfd3..60b5a2e5 100644 --- a/examples/core/core_2d_camera_split_screen.c +++ b/examples/core/core_2d_camera_split_screen.c @@ -85,12 +85,12 @@ int main(void) // Draw full scene with first camera for (int i = 0; i < screenWidth/PLAYER_SIZE + 1; i++) { - DrawLineV((Vector2){PLAYER_SIZE*i, 0}, (Vector2){PLAYER_SIZE*i, screenHeight}, LIGHTGRAY); + DrawLineV((Vector2){(float)PLAYER_SIZE*i, 0}, (Vector2){ (float)PLAYER_SIZE*i, (float)screenHeight}, LIGHTGRAY); } for (int i = 0; i < screenHeight/PLAYER_SIZE + 1; i++) { - DrawLineV((Vector2){0, PLAYER_SIZE*i}, (Vector2){screenWidth, PLAYER_SIZE*i}, LIGHTGRAY); + DrawLineV((Vector2){0, (float)PLAYER_SIZE*i}, (Vector2){ (float)screenWidth, (float)PLAYER_SIZE*i}, LIGHTGRAY); } for (int i = 0; i < screenWidth/PLAYER_SIZE; i++) @@ -118,12 +118,12 @@ int main(void) // Draw full scene with second camera for (int i = 0; i < screenWidth/PLAYER_SIZE + 1; i++) { - DrawLineV((Vector2){PLAYER_SIZE*i, 0}, (Vector2){PLAYER_SIZE*i, screenHeight}, LIGHTGRAY); + DrawLineV((Vector2){ (float)PLAYER_SIZE*i, 0}, (Vector2){ (float)PLAYER_SIZE*i, (float)screenHeight}, LIGHTGRAY); } for (int i = 0; i < screenHeight/PLAYER_SIZE + 1; i++) { - DrawLineV((Vector2){0, PLAYER_SIZE*i}, (Vector2){screenWidth, PLAYER_SIZE*i}, LIGHTGRAY); + DrawLineV((Vector2){0, (float)PLAYER_SIZE*i}, (Vector2){ (float)screenWidth, (float)PLAYER_SIZE*i}, LIGHTGRAY); } for (int i = 0; i < screenWidth/PLAYER_SIZE; i++) diff --git a/examples/core/core_drop_files.c b/examples/core/core_drop_files.c index 9f622039..d4ddd9ed 100644 --- a/examples/core/core_drop_files.c +++ b/examples/core/core_drop_files.c @@ -53,7 +53,7 @@ int main(void) { FilePathList droppedFiles = LoadDroppedFiles(); - for (int i = 0, offset = filePathCounter; i < droppedFiles.count; i++) + for (int i = 0, offset = filePathCounter; i < (int)droppedFiles.count; i++) { if (filePathCounter < (MAX_FILEPATH_RECORDED - 1)) { @@ -77,7 +77,7 @@ int main(void) { DrawText("Dropped files:", 100, 40, 20, DARKGRAY); - for (unsigned int i = 0; i < filePathCounter; i++) + for (int i = 0; i < filePathCounter; i++) { if (i%2 == 0) DrawRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.5f)); else DrawRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.3f)); -- cgit v1.2.3