From 6389f4db4c1ede9739972f9ce657860c3e0a8aa1 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 10 Nov 2025 13:02:26 -0800
Subject: [PATCH] SDL_FindColor() can be static
---
src/video/SDL_pixels.c | 2 +-
src/video/SDL_pixels_c.h | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/video/SDL_pixels.c b/src/video/SDL_pixels.c
index 1a6d8d87e4d79..d7596c9e7357e 100644
--- a/src/video/SDL_pixels.c
+++ b/src/video/SDL_pixels.c
@@ -1187,7 +1187,7 @@ void SDL_DitherPalette(SDL_Palette *palette)
/*
* Match an RGB value to a particular palette index
*/
-Uint8 SDL_FindColor(const SDL_Palette *pal, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
+static Uint8 SDL_FindColor(const SDL_Palette *pal, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
{
// Do colorspace distance matching
unsigned int smallest;
diff --git a/src/video/SDL_pixels_c.h b/src/video/SDL_pixels_c.h
index 91d102a26fe42..815393b0e5ab0 100644
--- a/src/video/SDL_pixels_c.h
+++ b/src/video/SDL_pixels_c.h
@@ -50,7 +50,6 @@ extern bool SDL_MapSurface(SDL_Surface *src, SDL_Surface *dst);
// Miscellaneous functions
extern bool SDL_IsSamePalette(const SDL_Palette *src, const SDL_Palette *dst);
extern void SDL_DitherPalette(SDL_Palette *palette);
-extern Uint8 SDL_FindColor(const SDL_Palette *pal, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
extern Uint8 SDL_LookupRGBAColor(SDL_HashTable *palette_map, Uint32 pixelvalue, const SDL_Palette *pal);
extern void SDL_DetectPalette(const SDL_Palette *pal, bool *is_opaque, bool *has_alpha_channel);
extern SDL_Surface *SDL_DuplicatePixels(int width, int height, SDL_PixelFormat format, SDL_Colorspace colorspace, void *pixels, int pitch);