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/openexr | |
parent | 03d8907ca7564c88c9f5357be93a74adbc638665 (diff) |
ImBuf: cleanup, use const for memory passed in
Diffstat (limited to 'source/blender/imbuf/intern/openexr')
-rw-r--r-- | source/blender/imbuf/intern/openexr/openexr_api.cpp | 6 | ||||
-rw-r--r-- | source/blender/imbuf/intern/openexr/openexr_api.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index 6bb1f0cd0d3..36742cb91eb 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -302,7 +302,7 @@ extern "C" * Test presence of OpenEXR file. * \param mem pointer to loaded OpenEXR bitstream */ -int imb_is_a_openexr(unsigned char *mem) +int imb_is_a_openexr(const unsigned char *mem) { return Imf::isImfMagic((const char *)mem); } @@ -1900,7 +1900,7 @@ static bool imb_exr_is_multi(MultiPartInputFile& file) return false; } -struct ImBuf *imb_load_openexr(unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) +struct ImBuf *imb_load_openexr(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) { struct ImBuf *ibuf = NULL; Mem_IStream *membuf = NULL; @@ -1914,7 +1914,7 @@ struct ImBuf *imb_load_openexr(unsigned char *mem, size_t size, int flags, char { bool is_multi; - membuf = new Mem_IStream(mem, size); + membuf = new Mem_IStream((unsigned char *)mem, size); file = new MultiPartInputFile(*membuf); Box2i dw = file->header(0).dataWindow(); diff --git a/source/blender/imbuf/intern/openexr/openexr_api.h b/source/blender/imbuf/intern/openexr/openexr_api.h index bc21d8cea7b..ec4ae94795d 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.h +++ b/source/blender/imbuf/intern/openexr/openexr_api.h @@ -41,11 +41,11 @@ extern "C" { void imb_initopenexr (void); -int imb_is_a_openexr (unsigned char *mem); +int imb_is_a_openexr (const unsigned char *mem); int imb_save_openexr (struct ImBuf *ibuf, const char *name, int flags); -struct ImBuf *imb_load_openexr (unsigned char *mem, size_t size, int flags, char *colorspace); +struct ImBuf *imb_load_openexr (const unsigned char *mem, size_t size, int flags, char *colorspace); #ifdef __cplusplus } |