From 9e4253f6706fe3fdf7007de23c024149d716deaa Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Wed, 1 May 2013 20:26:35 +0200 Subject: [PATCH] Added the last missing 'const' attributes to function parameters --- wrlib/context.c | 2 +- wrlib/gradient.c | 2 +- wrlib/misc.c | 2 +- wrlib/raster.c | 4 ++-- wrlib/wraster.h | 12 ++++++------ 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/wrlib/context.c b/wrlib/context.c index 6a4f04e5..fa4bf409 100644 --- a/wrlib/context.c +++ b/wrlib/context.c @@ -558,7 +558,7 @@ static int count_offset(unsigned long mask) return i; } -RContext *RCreateContext(Display * dpy, int screen_number, RContextAttributes * attribs) +RContext *RCreateContext(Display * dpy, int screen_number, const RContextAttributes * attribs) { RContext *context; XGCValues gcv; diff --git a/wrlib/gradient.c b/wrlib/gradient.c index 718f8790..930d1225 100644 --- a/wrlib/gradient.c +++ b/wrlib/gradient.c @@ -65,7 +65,7 @@ RImage *RRenderMultiGradient(unsigned width, unsigned height, RColor ** colors, return NULL; } -RImage *RRenderGradient(unsigned width, unsigned height, RColor * from, RColor * to, int style) +RImage *RRenderGradient(unsigned width, unsigned height, const RColor * from, const RColor * to, int style) { switch (style) { case RHorizontalGradient: diff --git a/wrlib/misc.c b/wrlib/misc.c index 399aa6f3..5b0bac4d 100644 --- a/wrlib/misc.c +++ b/wrlib/misc.c @@ -166,7 +166,7 @@ static __inline__ unsigned char clip(int c) return (unsigned char)c; } -void RLightImage(RImage *image, RColor *color) +void RLightImage(RImage *image, const RColor *color) { unsigned char *d = image->data; unsigned char *dd; diff --git a/wrlib/raster.c b/wrlib/raster.c index fbc73a7f..e2a2d997 100644 --- a/wrlib/raster.c +++ b/wrlib/raster.c @@ -529,7 +529,7 @@ RCombineAreaWithOpaqueness(RImage * image, RImage * src, int sx, int sy, #undef COP } -void RCombineImageWithColor(RImage * image, RColor * color) +void RCombineImageWithColor(RImage * image, const RColor * color) { register int i; unsigned char *d; @@ -602,7 +602,7 @@ RImage *RMakeTiledImage(RImage * tile, unsigned width, unsigned height) return image; } -RImage *RMakeCenteredImage(RImage * image, unsigned width, unsigned height, RColor * color) +RImage *RMakeCenteredImage(RImage * image, unsigned width, unsigned height, const RColor * color) { int x, y, w, h, sx, sy; RImage *tmp; diff --git a/wrlib/wraster.h b/wrlib/wraster.h index 30dfe92b..b5e360ea 100644 --- a/wrlib/wraster.h +++ b/wrlib/wraster.h @@ -304,7 +304,7 @@ char *RGetImageFileFormat(const char *file); * Xlib contexts */ RContext *RCreateContext(Display *dpy, int screen_number, - RContextAttributes *attribs); + const RContextAttributes *attribs); void RDestroyContext(RContext *context); @@ -341,7 +341,7 @@ RImage *RCloneImage(RImage *image); RImage *RGetSubImage(RImage *image, int x, int y, unsigned width, unsigned height); -void RCombineImageWithColor(RImage *image, RColor *color); +void RCombineImageWithColor(RImage *image, const RColor *color); void RCombineImages(RImage *image, RImage *src); @@ -371,7 +371,7 @@ RImage *RRotateImage(RImage *image, float angle); RImage *RMakeTiledImage(RImage *tile, unsigned width, unsigned height); RImage* RMakeCenteredImage(RImage *image, unsigned width, unsigned height, - RColor *color); + const RColor *color); /* * Drawing @@ -415,14 +415,14 @@ void RHSVtoRGB(const RHSVColor *hsv, RColor *rgb); */ void RClearImage(RImage *image, const RColor *color); -void RLightImage(RImage *image, RColor *color); +void RLightImage(RImage *image, const RColor *color); void RFillImage(RImage *image, const RColor *color); void RBevelImage(RImage *image, int bevel_type); -RImage *RRenderGradient(unsigned width, unsigned height, RColor *from, - RColor *to, int style); +RImage *RRenderGradient(unsigned width, unsigned height, const RColor *from, + const RColor *to, int style); RImage *RRenderMultiGradient(unsigned width, unsigned height, RColor **colors, -- 2.11.4.GIT