summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-07-15 17:55:31 +0200
committerraveit65 <[email protected]>2020-08-23 20:52:58 +0200
commit009aef5586de021292fc365969e763a98be53a75 (patch)
tree8b6fffba9ea1559364c37f3862efeb639976392d
parent1558f84366a4ecc37d31ab75ca6ec363d86fa667 (diff)
downloadatril-009aef5586de021292fc365969e763a98be53a75.tar.bz2
atril-009aef5586de021292fc365969e763a98be53a75.tar.xz
ev-pixbuf-cache: Remove -Wtype-limits warnings
-rw-r--r--libview/ev-pixbuf-cache.c12
1 files changed, 6 insertions, 6 deletions
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