From 24920570b11e0c849464e9049e609e2438804276 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Tue, 16 Apr 2024 10:49:44 +0900 Subject: [PATCH] Fix FTBFS reported in issue #67 Signed-off-by: Michele Calgaro --- chalk/plugins/filters/cimg/CImg.h | 6 +++--- karbon/render/xrgbrender/gdk-pixbuf-xlib-drawable.c | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/chalk/plugins/filters/cimg/CImg.h b/chalk/plugins/filters/cimg/CImg.h index 176b8fc91..f4ee92195 100644 --- a/chalk/plugins/filters/cimg/CImg.h +++ b/chalk/plugins/filters/cimg/CImg.h @@ -11097,9 +11097,9 @@ namespace cimg_library { // INNER CLASS used by function CImg<>::draw_fill() template struct _draw_fill { - const T1 *const color; - const float sigma,opacity; - const CImg value; + const T1 *color; + float sigma,opacity; + CImg value; CImg region; _draw_fill(const CImg& img,const int x,const int y,const int z, diff --git a/karbon/render/xrgbrender/gdk-pixbuf-xlib-drawable.c b/karbon/render/xrgbrender/gdk-pixbuf-xlib-drawable.c index e9ac4c9b9..05e42f7b2 100644 --- a/karbon/render/xrgbrender/gdk-pixbuf-xlib-drawable.c +++ b/karbon/render/xrgbrender/gdk-pixbuf-xlib-drawable.c @@ -518,7 +518,11 @@ rgb565amsb (XImage *image, unsigned char *pixels, int rowstride, xlib_colormap * bpl = image->bytes_per_line; for (yy = 0; yy < height; yy++) { +#ifdef LITTLE s = srow; +#else + s = (unsigned short *) srow; +#endif o = (unsigned int *) orow; for (xx = 0; xx < width; xx ++) { unsigned int data; @@ -641,7 +645,11 @@ rgb555msb (XImage *image, unsigned char *pixels, int rowstride, xlib_colormap *c bpl = image->bytes_per_line; for (yy = 0; yy < height; yy++) { +#ifdef LITTLE s = srow; +#else + s = (unsigned int *) srow; +#endif o = (unsigned short *) orow; for (xx = 1; xx < width; xx += 2) { unsigned int data;