From 6ba6df3af348b657a9f09a3757ebaa5e473406dc Mon Sep 17 00:00:00 2001 From: Ray Date: Fri, 13 Mar 2026 18:50:26 +0100 Subject: [PATCH] Remove trailing spaces --- src/CMakeLists.txt | 4 ++-- src/platforms/rcore_android.c | 6 +++--- src/platforms/rcore_web.c | 22 +++++++++++----------- src/platforms/rcore_web_emscripten.c | 20 ++++++++++---------- src/raudio.c | 2 +- src/rlgl.h | 2 +- src/rmodels.c | 2 +- src/rtext.c | 8 ++++---- tools/rexm/rexm.c | 20 ++++++++++---------- 9 files changed, 43 insertions(+), 43 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0975457ee..cad82aa8f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -124,10 +124,10 @@ if (PLATFORM STREQUAL "Desktop") target_compile_definitions(raylib PRIVATE _GLFW_X11) - target_link_libraries(raylib PRIVATE + target_link_libraries(raylib PRIVATE ${X11_LIBRARIES} ) - + message(STATUS "X11 support enabled for raylib") endif() endif() diff --git a/src/platforms/rcore_android.c b/src/platforms/rcore_android.c index 42b58ff82..7f8ca8a7b 100644 --- a/src/platforms/rcore_android.c +++ b/src/platforms/rcore_android.c @@ -280,15 +280,15 @@ static int android_close(void *cookie); // The flag MUST be applied at every final link step that needs wrapping, // it has no effect when only building a static archive (.a) // -// CMake: no action required, raylib's CMakeLists.txt already sets +// CMake: no action required, raylib's CMakeLists.txt already sets // target_link_options(raylib INTERFACE -Wl,--wrap=fopen) which propagates to // the final app link, wrapping app code and all static (.a) dependencies too -// Make (SHARED): no action required for raylib itself, src/Makefile already sets +// Make (SHARED): no action required for raylib itself, src/Makefile already sets // LDFLAGS += -Wl,--wrap=fopen wrapping fopen inside libraylib.so only; // app code and static (.a) dependencies are NOT wrapped unless -Wl,--wrap=fopen // is also added to the final app link step // Make (STATIC): pass -Wl,--wrap=fopen to the linker command producing the final artifact -// build.zig: no dedicated wrap helper; pass -Wl,--wrap=fopen to the linker command producing +// build.zig: no dedicated wrap helper; pass -Wl,--wrap=fopen to the linker command producing // the final artifact // custom: pass -Wl,--wrap=fopen to the linker command producing the final artifact FILE *__real_fopen(const char *fileName, const char *mode); // Real fopen, provided by the linker (--wrap=fopen) diff --git a/src/platforms/rcore_web.c b/src/platforms/rcore_web.c index da7b2713d..ae847d8c9 100644 --- a/src/platforms/rcore_web.c +++ b/src/platforms/rcore_web.c @@ -819,22 +819,22 @@ EM_ASYNC_JS(void, RequestClipboardData, (void), { { const blob = await item.getType(item.types.find(t => t.startsWith("image/"))); const bitmap = await createImageBitmap(blob); - + const canvas = document.createElement('canvas'); canvas.width = bitmap.width; canvas.height = bitmap.height; const ctx = canvas.getContext('2d'); ctx.drawImage(bitmap, 0, 0); - + const imgData = ctx.getImageData(0, 0, canvas.width, canvas.height).data; - + // Store image and data for the Fetch function window._lastImgWidth = canvas.width; window._lastImgHeight = canvas.height; - window._lastImgData = imgData; + window._lastImgData = imgData; } } - } + } else console.warn("Clipboard read() requires HTTPS/Localhost"); }); @@ -856,19 +856,19 @@ EM_JS(unsigned char *, GetLastPastedImage, (int *width, int *height), { if (window._lastImgData) { const data = window._lastImgData; - if (data.length > 0) + if (data.length > 0) { const ptr = _malloc(data.length); HEAPU8.set(data, ptr); - + // Set the width and height via the pointers passed from C // HEAP32 handles the 4-byte integers if (width) setValue(width, window._lastImgWidth, 'i32'); if (height) setValue(height, window._lastImgHeight, 'i32'); - + // Clear the JS buffer so there is no need to fetch the same image twice - window._lastImgData = null; - + window._lastImgData = null; + return ptr; } } @@ -898,7 +898,7 @@ Image GetClipboardImage(void) image.mipmaps = 1; image.format = PIXELFORMAT_UNCOMPRESSED_R8G8B8A8; } - + return image; } diff --git a/src/platforms/rcore_web_emscripten.c b/src/platforms/rcore_web_emscripten.c index 05da0da2e..df3234217 100644 --- a/src/platforms/rcore_web_emscripten.c +++ b/src/platforms/rcore_web_emscripten.c @@ -797,22 +797,22 @@ EM_ASYNC_JS(void, RequestClipboardData, (void), { { const blob = await item.getType(item.types.find(t => t.startsWith("image/"))); const bitmap = await createImageBitmap(blob); - + const canvas = document.createElement('canvas'); canvas.width = bitmap.width; canvas.height = bitmap.height; const ctx = canvas.getContext('2d'); ctx.drawImage(bitmap, 0, 0); - + const imgData = ctx.getImageData(0, 0, canvas.width, canvas.height).data; - + // Store image and data for the Fetch function window._lastImgWidth = canvas.width; window._lastImgHeight = canvas.height; - window._lastImgData = imgData; + window._lastImgData = imgData; } } - } + } else console.warn("Clipboard read() requires HTTPS/Localhost"); }); @@ -838,15 +838,15 @@ EM_JS(unsigned char *, GetLastPastedImage, (int *width, int *height), { { const ptr = _malloc(data.length); HEAPU8.set(data, ptr); - + // Set the width and height via the pointers passed from C // HEAP32 handles the 4-byte integers if (width) setValue(width, window._lastImgWidth, 'i32'); if (height) setValue(height, window._lastImgHeight, 'i32'); - + // Clear the JS buffer so there is no need to fetch the same image twice - window._lastImgData = null; - + window._lastImgData = null; + return ptr; } } @@ -876,7 +876,7 @@ Image GetClipboardImage(void) image.mipmaps = 1; image.format = PIXELFORMAT_UNCOMPRESSED_R8G8B8A8; } - + return image; } diff --git a/src/raudio.c b/src/raudio.c index 7020f6d53..937c33ac3 100644 --- a/src/raudio.c +++ b/src/raudio.c @@ -1634,7 +1634,7 @@ Music LoadMusicStreamFromMemory(const char *fileType, const unsigned char *data, { music.ctxType = MUSIC_AUDIO_QOA; music.ctxData = ctxQoa; - + // NOTE: Loading samples are 32bit float normalized data, so, // configure the output audio stream to also use float 32bit music.stream = LoadAudioStream(ctxQoa->info.samplerate, 32, ctxQoa->info.channels); diff --git a/src/rlgl.h b/src/rlgl.h index e5b7d87f4..b40b50b43 100644 --- a/src/rlgl.h +++ b/src/rlgl.h @@ -4446,7 +4446,7 @@ void rlUnloadShader(unsigned int id) { #if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2) glDeleteShader(id); - + TRACELOG(RL_LOG_INFO, "SHADER: [ID %i] Unloaded shader data from VRAM (GPU)", id); #endif } diff --git a/src/rmodels.c b/src/rmodels.c index 2807f5d9b..1c7a5452c 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -3375,7 +3375,7 @@ Mesh GenMeshCubicmap(Image cubicmap, Vector3 cubeSize) Vector3 n5 = { 0.0f, 0.0f, -1.0f }; Vector3 n6 = { 0.0f, 0.0f, 1.0f }; - // NOTE: Using texture rectangles to define different + // NOTE: Using texture rectangles to define different // textures for top-bottom-front-back-right-left (6) typedef struct RectangleF { float x; diff --git a/src/rtext.c b/src/rtext.c index aa01e9015..936ab9c16 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -156,7 +156,7 @@ extern void LoadFontDefault(void) { #define BIT_CHECK(a,b) ((a) & (1u << (b))) - // Check to see if the font for an image has alreeady been allocated, + // Check to see if the font for an image has alreeady been allocated, // and if no need to upload, then return if (defaultFont.glyphs != NULL) return; @@ -242,7 +242,7 @@ extern void LoadFontDefault(void) { if (BIT_CHECK(defaultFontData[counter], j)) { - // NOTE: Unreferencing data as short, so, + // NOTE: Unreferencing data as short, so, // considering data as little-endian (alpha + gray) ((unsigned short *)imFont.data)[i + j] = 0xffff; } @@ -446,7 +446,7 @@ Font LoadFontFromImage(Image image, Color key, int firstChar) int charHeight = 0; int j = 0; - while (((lineSpacing + j) < image.height) && + while (((lineSpacing + j) < image.height) && !COLOR_EQUAL(pixels[(lineSpacing + j)*image.width + charSpacing], key)) j++; charHeight = j; @@ -470,7 +470,7 @@ Font LoadFontFromImage(Image image, Color key, int firstChar) int charWidth = 0; - while (((xPosToRead + charWidth) < image.width) && + while (((xPosToRead + charWidth) < image.width) && !COLOR_EQUAL(pixels[(lineSpacing + (charHeight + lineSpacing)*lineToRead)*image.width + xPosToRead + charWidth], key)) charWidth++; tempCharRecs[index].width = (float)charWidth; diff --git a/tools/rexm/rexm.c b/tools/rexm/rexm.c index 011102ce1..c681530c9 100644 --- a/tools/rexm/rexm.c +++ b/tools/rexm/rexm.c @@ -659,7 +659,7 @@ int main(int argc, char *argv[]) // we must store provided file paths because pointers will be overwriten // TODO: It seems projects are added to solution BUT not to required solution folder, // that process still requires to be done manually - LOG("INFO: [%s] Adding project to raylib solution (.sln)\n", + LOG("INFO: [%s] Adding project to raylib solution (.sln)\n", TextFormat("%s/../projects/VS2022/examples/%s.vcxproj", exBasePath, exName)); AddVSProjectToSolution(exVSProjectSolutionFile, TextFormat("%s/../projects/VS2022/examples/%s.vcxproj", exBasePath, exName), exCategory); @@ -1254,7 +1254,7 @@ int main(int argc, char *argv[]) exCollection[i].status &= ~VALID_NOT_IN_README; exCollection[i].status &= ~VALID_NOT_IN_JS; } - + // Check examples "status" information for (int i = 0; i < exCollectionCount; i++) { @@ -2686,21 +2686,21 @@ static int AddVSProjectToSolution(const char *slnFile, const char *projFile, con // Add project folder line // NOTE: Folder uuid depends on category - if (strcmp(category, "core") == 0) offsetIndex += sprintf(slnTextUpdated + offsetIndex, + if (strcmp(category, "core") == 0) offsetIndex += sprintf(slnTextUpdated + offsetIndex, TextFormat("\t\t{%s} = {6C82BAAE-BDDF-457D-8FA8-7E2490B07035}\n", uuid)); - else if (strcmp(category, "shapes") == 0) offsetIndex += sprintf(slnTextUpdated + offsetIndex, + else if (strcmp(category, "shapes") == 0) offsetIndex += sprintf(slnTextUpdated + offsetIndex, TextFormat("\t\t{%s} = {278D8859-20B1-428F-8448-064F46E1F021}\n", uuid)); - else if (strcmp(category, "textures") == 0) offsetIndex += sprintf(slnTextUpdated + offsetIndex, + else if (strcmp(category, "textures") == 0) offsetIndex += sprintf(slnTextUpdated + offsetIndex, TextFormat("\t\t{%s} = {DA049009-21FF-4AC0-84E4-830DD1BCD0CE}\n", uuid)); - else if (strcmp(category, "text") == 0) offsetIndex += sprintf(slnTextUpdated + offsetIndex, + else if (strcmp(category, "text") == 0) offsetIndex += sprintf(slnTextUpdated + offsetIndex, TextFormat("\t\t{%s} = {8D3C83B7-F1E0-4C2E-9E34-EE5F6AB2502A}\n", uuid)); - else if (strcmp(category, "models") == 0) offsetIndex += sprintf(slnTextUpdated + offsetIndex, + else if (strcmp(category, "models") == 0) offsetIndex += sprintf(slnTextUpdated + offsetIndex, TextFormat("\t\t{%s} = {AF5BEC5C-1F2B-4DA8-B12D-D09FE569237C}\n", uuid)); - else if (strcmp(category, "shaders") == 0) offsetIndex += sprintf(slnTextUpdated + offsetIndex, + else if (strcmp(category, "shaders") == 0) offsetIndex += sprintf(slnTextUpdated + offsetIndex, TextFormat("\t\t{%s} = {5317807F-61D4-4E0F-B6DC-2D9F12621ED9}\n", uuid)); - else if (strcmp(category, "audio") == 0) offsetIndex += sprintf(slnTextUpdated + offsetIndex, + else if (strcmp(category, "audio") == 0) offsetIndex += sprintf(slnTextUpdated + offsetIndex, TextFormat("\t\t{%s} = {CC132A4D-D081-4C26-BFB9-AB11984054F8}\n", uuid)); - else if (strcmp(category, "other") == 0) offsetIndex += sprintf(slnTextUpdated + offsetIndex, + else if (strcmp(category, "other") == 0) offsetIndex += sprintf(slnTextUpdated + offsetIndex, TextFormat("\t\t{%s} = {E9D708A5-9C1F-4B84-A795-C5F191801762}\n", uuid)); else LOG("WARNING: Provided category is not valid: %s\n", category); //----------------------------------------------------------------------------------------