From ce40053a6c138f963cf4907289db3893f88cdbe1 Mon Sep 17 00:00:00 2001 From: Ray Date: Mon, 20 Jul 2026 20:36:14 +0200 Subject: [PATCH] Remove trailing spaces --- src/platforms/rcore_desktop_glfw.c | 8 ++++---- src/platforms/rcore_desktop_rgfw.c | 8 ++++---- src/platforms/rcore_desktop_win32.c | 6 +++--- src/platforms/rcore_drm.c | 2 +- src/rcore.c | 2 +- src/rlgl.h | 10 +++++----- src/rtextures.c | 6 +++--- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/platforms/rcore_desktop_glfw.c b/src/platforms/rcore_desktop_glfw.c index 934815c0f..22bd6b4e2 100644 --- a/src/platforms/rcore_desktop_glfw.c +++ b/src/platforms/rcore_desktop_glfw.c @@ -1198,7 +1198,7 @@ void OpenURL(const char *url) TRACELOG(LOG_WARNING, "SYSTEM: Provided URL must start with 'http://' or 'https://' protocols"); } else - { + { char *cmd = (char *)RL_CALLOC(strlen(url) + 16, sizeof(char)); #if defined(_WIN32) sprintf(cmd, "explorer \"%s\"", url); @@ -1211,7 +1211,7 @@ void OpenURL(const char *url) #endif // TODO: Replace system() call by custom process int result = system(cmd); - + if (result == -1) TRACELOG(LOG_WARNING, "OpenURL() child process could not be created"); RL_FREE(cmd); } @@ -2186,12 +2186,12 @@ static void MouseScrollCallback(GLFWwindow *window, double xoffset, double yoffs // GLFW3: Cursor ennter callback, when cursor enters the window static void CursorEnterCallback(GLFWwindow *window, int entered) { - if (entered) + if (entered) { // NOTE: Mouse position updated by MouseCursorPosCallback() CORE.Input.Mouse.cursorOnScreen = true; } - else + else { CORE.Input.Mouse.cursorOnScreen = false; CORE.Input.Mouse.currentPosition = (Vector2){ 0 }; diff --git a/src/platforms/rcore_desktop_rgfw.c b/src/platforms/rcore_desktop_rgfw.c index 9907e8a60..9e814f33c 100644 --- a/src/platforms/rcore_desktop_rgfw.c +++ b/src/platforms/rcore_desktop_rgfw.c @@ -1488,7 +1488,7 @@ void OpenURL(const char *url) TRACELOG(LOG_WARNING, "SYSTEM: Provided URL must start with 'http://' or 'https://' protocols"); } else - { + { char *cmd = (char *)RL_CALLOC(strlen(url) + 16, sizeof(char)); #if defined(_WIN32) sprintf(cmd, "explorer \"%s\"", url); @@ -1621,7 +1621,7 @@ void PollInputEvents(void) while (mg_gamepads_check_event(&platform.minigamepad, &gamepad_event)) { int gamepadIndex = gamepad_event.gamepad->index; - + switch (gamepad_event.type) { case MG_EVENT_BUTTON_PRESS: @@ -1682,10 +1682,10 @@ void PollInputEvents(void) if (platform.minigamepad.gamepads[gamepadIndex].axes[i].supported) axisCount += 1; else break; } - + CORE.Input.Gamepad.axisCount[gamepadIndex] = axisCount; snprintf(CORE.Input.Gamepad.name[gamepadIndex], MAX_GAMEPAD_NAME_LENGTH, "%s", platform.minigamepad.gamepads[gamepadIndex].name); - + } break; case MG_EVENT_GAMEPAD_DISCONNECT: CORE.Input.Gamepad.ready[gamepadIndex] = false; break; default: break; diff --git a/src/platforms/rcore_desktop_win32.c b/src/platforms/rcore_desktop_win32.c index a6e85a657..1e560aa56 100644 --- a/src/platforms/rcore_desktop_win32.c +++ b/src/platforms/rcore_desktop_win32.c @@ -1264,11 +1264,11 @@ void OpenURL(const char *url) TRACELOG(LOG_WARNING, "SYSTEM: Provided URL must start with 'http://' or 'https://' protocols"); } else - { + { int len = strlen(url) + 16; char *cmd = (char *)RL_CALLOC(len, sizeof(char)); snprintf(cmd, len, "explorer \"%s\"", url); - + int result = system(cmd); if (result == -1) TRACELOG(LOG_WARNING, "OpenURL() child process could not be created"); RL_FREE(cmd); @@ -1299,7 +1299,7 @@ void SetMousePosition(int x, int y) if (!CORE.Input.Mouse.cursorLocked) { CORE.Input.Mouse.currentPosition = (Vector2){ (float)x, (float)y }; - + TRACELOG(LOG_WARNING, "SetMousePosition not implemented at platform level"); } else TRACELOG(LOG_WARNING, "INPUT: MOUSE: Cursor not enabled"); diff --git a/src/platforms/rcore_drm.c b/src/platforms/rcore_drm.c index 4d4a4d3bf..fce19408b 100644 --- a/src/platforms/rcore_drm.c +++ b/src/platforms/rcore_drm.c @@ -1444,7 +1444,7 @@ int InitPlatform(void) return -1; } - // WARNING: Providing framebufferAttribs is not logically necessary, + // WARNING: Providing framebufferAttribs is not logically necessary, // but it may prevent segfaults on some nvidia drivers if (!eglChooseConfig(platform.device, framebufferAttribs, NULL, 0, &numConfigs)) { diff --git a/src/rcore.c b/src/rcore.c index c1fd31b15..450a4cec5 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -2846,7 +2846,7 @@ bool IsPathDirectory(const char *path) bool IsPathAbsolute(const char *path) { int result = false; - + if ((path != NULL) && (path[0] != '\0')) { #if defined(_WIN32) diff --git a/src/rlgl.h b/src/rlgl.h index 7f3fe54cd..be24bbb78 100644 --- a/src/rlgl.h +++ b/src/rlgl.h @@ -3793,7 +3793,7 @@ unsigned char *rlReadScreenPixels(int width, int height) { unsigned char *imgData = (unsigned char *)RL_CALLOC(width*height*4, sizeof(unsigned char)); - // NOTE: Buffer retrieved is GL_FRONT in single-buffered configurations + // NOTE: Buffer retrieved is GL_FRONT in single-buffered configurations // and GL_BACK in double-buffered configurations, make sure to call it at the end of frame //glReadBuffer(GL_BACK); @@ -5243,7 +5243,7 @@ static int rlGetPixelDataSize(int width, int height, int format) int blockHeight = (height + 3)/4; unsigned long long dataSizeBytes = (unsigned long long)blockWidth*blockHeight*8; if (dataSizeBytes < INT_MAX) dataSize = (int)dataSizeBytes; - + } break; case RL_PIXELFORMAT_COMPRESSED_DXT3_RGBA: case RL_PIXELFORMAT_COMPRESSED_DXT5_RGBA: @@ -5254,7 +5254,7 @@ static int rlGetPixelDataSize(int width, int height, int format) int blockHeight = (height + 3)/4; unsigned long long dataSizeBytes = (unsigned long long)blockWidth*blockHeight*16; if (dataSizeBytes < INT_MAX) dataSize = (int)dataSizeBytes; - + } break; case RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA: // 4 bytes per each 4x4 block { @@ -5262,7 +5262,7 @@ static int rlGetPixelDataSize(int width, int height, int format) int blockHeight = (height + 3)/4; unsigned long long dataSizeBytes = (unsigned long long)blockWidth*blockHeight*4; if (dataSizeBytes < INT_MAX) dataSize = (int)dataSizeBytes; - + } break; default: break; } @@ -5274,7 +5274,7 @@ static int rlGetPixelDataSize(int width, int height, int format) unsigned long long dataSizeBytes = ((unsigned long long)width*height*bpp) >> 3; // Get size in bytes (dividing by 8) if (dataSizeBytes < INT_MAX) dataSize = (int)dataSizeBytes; } - + if (dataSize == 0) TRACELOG(LOG_WARNING, "Requested image size is larger than 2GB, it can not be allocated"); return dataSize; diff --git a/src/rtextures.c b/src/rtextures.c index 15f009354..9f0fa7645 100644 --- a/src/rtextures.c +++ b/src/rtextures.c @@ -1250,7 +1250,7 @@ Image ImageFromImage(Image image, Rectangle rec) for (int y = 0; y < (int)rec.height; y++) { - memcpy(((unsigned char *)result.data) + y*(int)rec.width*bytesPerPixel, + memcpy(((unsigned char *)result.data) + y*(int)rec.width*bytesPerPixel, ((unsigned char *)image.data) + ((y + (int)rec.y)*image.width + (int)rec.x)*bytesPerPixel, (int)rec.width*bytesPerPixel); } @@ -5523,7 +5523,7 @@ int GetPixelDataSize(int width, int height, int format) case PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA: bpp = 2; break; default: break; } - + unsigned long long dataSizeBytes = ((unsigned long long)width*height*bpp) >> 3; // Get size in bytes (dividing by 8) if (dataSizeBytes < INT_MAX) @@ -5538,7 +5538,7 @@ int GetPixelDataSize(int width, int height, int format) else if ((format >= PIXELFORMAT_COMPRESSED_DXT3_RGBA) && (format < PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA)) dataSize = 16; } } - + // NOTE: In case required image data larger than 2GB, no memory allocated at all (NULL) if (dataSize == 0) TRACELOG(LOG_WARNING, "Requested image size is larger than 2GB, it can not be allocated");