diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-02-22 14:20:37 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-02-22 14:31:17 +0100 |
commit | 2af96d78c56c9cc81176c732563a5a4338012a0b (patch) | |
tree | 14870652195ea97de5a6a6630a0b478ecce8fba9 /source/fitz/image.c | |
parent | ad8a5680e6d3fd1ad77ae2c1a3d38ebe2042f2cb (diff) | |
download | mupdf-2af96d78c56c9cc81176c732563a5a4338012a0b.tar.xz |
Drop const from fz_image.
Image objects are immutable and opaque once constructed.
Therefore there is no need for the const keyword.
Diffstat (limited to 'source/fitz/image.c')
-rw-r--r-- | source/fitz/image.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/fitz/image.c b/source/fitz/image.c index 297e6263..59e2ab56 100644 --- a/source/fitz/image.c +++ b/source/fitz/image.c @@ -3,13 +3,13 @@ #define SANE_DPI 72.0f fz_image * -fz_keep_image(fz_context *ctx, const fz_image *image) +fz_keep_image(fz_context *ctx, fz_image *image) { - return (fz_image *)fz_keep_storable(ctx, &image->storable); + return fz_keep_storable(ctx, &image->storable); } void -fz_drop_image(fz_context *ctx, const fz_image *image) +fz_drop_image(fz_context *ctx, fz_image *image) { fz_drop_storable(ctx, &image->storable); } @@ -18,7 +18,7 @@ typedef struct fz_image_key_s fz_image_key; struct fz_image_key_s { int refs; - const fz_image *image; + fz_image *image; int l2factor; }; @@ -93,7 +93,7 @@ fz_mask_color_key(fz_pixmap *pix, int n, const int *colorkey) } static void -fz_unblend_masked_tile(fz_context *ctx, fz_pixmap *tile, const fz_image *image) +fz_unblend_masked_tile(fz_context *ctx, fz_pixmap *tile, fz_image *image) { fz_pixmap *mask = fz_get_pixmap_from_image(ctx, image->mask, tile->w, tile->h); unsigned char *s = mask->samples, *end = s + mask->w * mask->h; @@ -121,7 +121,7 @@ fz_unblend_masked_tile(fz_context *ctx, fz_pixmap *tile, const fz_image *image) } fz_pixmap * -fz_decomp_image_from_stream(fz_context *ctx, fz_stream *stm, const fz_image *image, int indexed, int l2factor) +fz_decomp_image_from_stream(fz_context *ctx, fz_stream *stm, fz_image *image, int indexed, int l2factor) { fz_pixmap *tile = NULL; int stride, len, i; @@ -218,7 +218,7 @@ fz_drop_image_imp(fz_context *ctx, fz_storable *image_) } static fz_pixmap * -standard_image_get_pixmap(fz_context *ctx, const fz_image *image, int w, int h, int *l2factor) +standard_image_get_pixmap(fz_context *ctx, fz_image *image, int w, int h, int *l2factor) { int native_l2factor; fz_stream *stm; @@ -285,7 +285,7 @@ standard_image_get_pixmap(fz_context *ctx, const fz_image *image, int w, int h, } fz_pixmap * -fz_get_pixmap_from_image(fz_context *ctx, const fz_image *image, int w, int h) +fz_get_pixmap_from_image(fz_context *ctx, fz_image *image, int w, int h) { fz_pixmap *tile; int l2factor, l2factor_remaining; |