Browse Source

SDL_FindColor() can be static

Sam Lantinga 4 months ago
parent
commit
6389f4db4c
2 changed files with 1 additions and 2 deletions
  1. 1 1
      src/video/SDL_pixels.c
  2. 0 1
      src/video/SDL_pixels_c.h

+ 1 - 1
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;

+ 0 - 1
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);