From ad8936bf2bcf54c7042bdec20c49c96657649b34 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Tue, 12 Jan 2016 17:30:59 +0000 Subject: Add lots of consts. In general, we should use 'const fz_blah' in device calls whenever the callee should not alter the fz_blah. Push this through. This shows up various places where we fz_keep and fz_drop these const things. I've updated the fz_keep and fz_drops with appropriate casts to remove the consts. We may need to do the union dance to avoid the consts for some compilers, but will only do that if required. I think this is nicer overall, even allowing for the const<->no const problems. --- scripts/cmapdump.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scripts/cmapdump.c') diff --git a/scripts/cmapdump.c b/scripts/cmapdump.c index aa5de920..6b77d8c9 100644 --- a/scripts/cmapdump.c +++ b/scripts/cmapdump.c @@ -228,12 +228,14 @@ void fz_copy_aa_context(fz_context *dst, fz_context *src) { } -void *fz_keep_storable(fz_context *ctx, fz_storable *s) +void *fz_keep_storable(fz_context *ctx, const fz_storable *sc) { + fz_storable *s = (fz_storable *)sc; + return s; } -void fz_drop_storable(fz_context *ctx, fz_storable *s) +void fz_drop_storable(fz_context *ctx, const fz_storable *s) { } -- cgit v1.2.3