Remove trailing spaces

This commit is contained in:
Ray
2026-03-13 18:50:26 +01:00
parent 7b9a2a4145
commit 6ba6df3af3
9 changed files with 43 additions and 43 deletions

View File

@@ -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()

View File

@@ -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)

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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);

View File

@@ -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
}

View File

@@ -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;

View File

@@ -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;