From 009aef5586de021292fc365969e763a98be53a75 Mon Sep 17 00:00:00 2001 From: rbuj Date: Wed, 15 Jul 2020 17:55:31 +0200 Subject: ev-pixbuf-cache: Remove -Wtype-limits warnings --- libview/ev-pixbuf-cache.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libview') diff --git a/libview/ev-pixbuf-cache.c b/libview/ev-pixbuf-cache.c index b98e4560..46031d7e 100644 --- a/libview/ev-pixbuf-cache.c +++ b/libview/ev-pixbuf-cache.c @@ -641,14 +641,14 @@ get_selection_colors (EvView *view, GdkColor *text, GdkColor *base) _ev_view_get_selection_colors (view, &bg, &fg); text->pixel = 0; - text->red = CLAMP ((guint) (fg.red * 65535), 0, 65535); - text->green = CLAMP ((guint) (fg.green * 65535), 0, 65535); - text->blue = CLAMP ((guint) (fg.blue * 65535), 0, 65535); + text->red = (guint16) (fg.red * G_MAXUINT16); + text->green = (guint16) (fg.green * G_MAXUINT16); + text->blue = (guint16) (fg.blue * G_MAXUINT16); base->pixel = 0; - base->red = CLAMP ((guint) (bg.red * 65535), 0, 65535); - base->green = CLAMP ((guint) (bg.green * 65535), 0, 65535); - base->blue = CLAMP ((guint) (bg.blue * 65535), 0, 65535); + base->red = (guint16) (bg.red * G_MAXUINT16); + base->green = (guint16) (bg.green * G_MAXUINT16); + base->blue = (guint16) (bg.blue * G_MAXUINT16); } static void -- cgit v1.2.1