diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-07-11 16:52:18 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-07-11 18:07:59 +0300 |
commit | 2410797ab15d08e5138b8cf10d8f8246513935af (patch) | |
tree | 7b256ebb075babe33fc307c8b536c48b24bbd4ee /source/blender/imbuf/intern/radiance_hdr.c | |
parent | 03d8907ca7564c88c9f5357be93a74adbc638665 (diff) |
ImBuf: cleanup, use const for memory passed in
Diffstat (limited to 'source/blender/imbuf/intern/radiance_hdr.c')
-rw-r--r-- | source/blender/imbuf/intern/radiance_hdr.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/imbuf/intern/radiance_hdr.c b/source/blender/imbuf/intern/radiance_hdr.c index 318bb7e96e3..32293e9de78 100644 --- a/source/blender/imbuf/intern/radiance_hdr.c +++ b/source/blender/imbuf/intern/radiance_hdr.c @@ -72,7 +72,7 @@ typedef float fCOLOR[3]; #define COPY_RGBE(c1, c2) (c2[RED] = c1[RED], c2[GRN] = c1[GRN], c2[BLU] = c1[BLU], c2[EXP] = c1[EXP]) /* read routines */ -static unsigned char *oldreadcolrs(RGBE *scan, unsigned char *mem, int xmax, unsigned char *mem_eof) +static const unsigned char *oldreadcolrs(RGBE *scan, const unsigned char *mem, int xmax, const unsigned char *mem_eof) { int i, rshift = 0, len = xmax; while (len > 0) { @@ -100,7 +100,7 @@ static unsigned char *oldreadcolrs(RGBE *scan, unsigned char *mem, int xmax, uns return mem; } -static unsigned char *freadcolrs(RGBE *scan, unsigned char *mem, int xmax, unsigned char *mem_eof) +static const unsigned char *freadcolrs(RGBE *scan, const unsigned char *mem, int xmax, const unsigned char *mem_eof) { int i, j, code, val; @@ -194,7 +194,7 @@ static void FLOAT2RGBE(fCOLOR fcol, RGBE rgbe) /* ImBuf read */ -int imb_is_a_hdr(unsigned char *buf) +int imb_is_a_hdr(const unsigned char *buf) { /* For recognition, Blender only loads first 32 bytes, so use #?RADIANCE id instead */ /* update: actually, the 'RADIANCE' part is just an optional program name, the magic word is really only the '#?' part */ @@ -204,7 +204,7 @@ int imb_is_a_hdr(unsigned char *buf) return 0; } -struct ImBuf *imb_loadhdr(unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) +struct ImBuf *imb_loadhdr(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) { struct ImBuf *ibuf; RGBE *sline; @@ -213,7 +213,7 @@ struct ImBuf *imb_loadhdr(unsigned char *mem, size_t size, int flags, char color int found = 0; int width = 0, height = 0; int x, y; - unsigned char *ptr, *mem_eof = mem + size; + const unsigned char *ptr, *mem_eof = mem + size; char oriY[80], oriX[80]; if (imb_is_a_hdr((void *)mem)) { |