aboutsummaryrefslogtreecommitdiffstats
path: root/src/image.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/image.c')
-rw-r--r--src/image.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/image.c b/src/image.c
index 4b73a5fe80c..1a2c0e29dde 100644
--- a/src/image.c
+++ b/src/image.c
@@ -4294,7 +4294,11 @@ struct ct_color
4294 4294
4295/* Value is a hash of the RGB color given by R, G, and B. */ 4295/* Value is a hash of the RGB color given by R, G, and B. */
4296 4296
4297#define CT_HASH_RGB(R, G, B) (((R) << 16) ^ ((G) << 8) ^ (B)) 4297static unsigned
4298ct_hash_rgb (unsigned r, unsigned g, unsigned b)
4299{
4300 return (r << 16) ^ (g << 8) ^ b;
4301}
4298 4302
4299/* The color hash table. */ 4303/* The color hash table. */
4300 4304
@@ -4349,7 +4353,7 @@ free_color_table (void)
4349static unsigned long 4353static unsigned long
4350lookup_rgb_color (struct frame *f, int r, int g, int b) 4354lookup_rgb_color (struct frame *f, int r, int g, int b)
4351{ 4355{
4352 unsigned hash = CT_HASH_RGB (r, g, b); 4356 unsigned hash = ct_hash_rgb (r, g, b);
4353 int i = hash % CT_SIZE; 4357 int i = hash % CT_SIZE;
4354 struct ct_color *p; 4358 struct ct_color *p;
4355 Display_Info *dpyinfo; 4359 Display_Info *dpyinfo;