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/dds | |
parent | 03d8907ca7564c88c9f5357be93a74adbc638665 (diff) |
ImBuf: cleanup, use const for memory passed in
Diffstat (limited to 'source/blender/imbuf/intern/dds')
-rw-r--r-- | source/blender/imbuf/intern/dds/dds_api.cpp | 6 | ||||
-rw-r--r-- | source/blender/imbuf/intern/dds/dds_api.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/imbuf/intern/dds/dds_api.cpp b/source/blender/imbuf/intern/dds/dds_api.cpp index 45d9fa2ac59..cad76ffcee1 100644 --- a/source/blender/imbuf/intern/dds/dds_api.cpp +++ b/source/blender/imbuf/intern/dds/dds_api.cpp @@ -73,7 +73,7 @@ int imb_save_dds(struct ImBuf *ibuf, const char *name, int /*flags*/) return(1); } -int imb_is_a_dds(unsigned char *mem) // note: use at most first 32 bytes +int imb_is_a_dds(const unsigned char *mem) // note: use at most first 32 bytes { /* heuristic check to see if mem contains a DDS file */ /* header.fourcc == FOURCC_DDS */ @@ -83,10 +83,10 @@ int imb_is_a_dds(unsigned char *mem) // note: use at most first 32 bytes return(1); } -struct ImBuf *imb_load_dds(unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) +struct ImBuf *imb_load_dds(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) { struct ImBuf *ibuf = NULL; - DirectDrawSurface dds(mem, size); /* reads header */ + DirectDrawSurface dds((unsigned char *)mem, size); /* reads header */ unsigned char bits_per_pixel; unsigned int *rect; Image img; diff --git a/source/blender/imbuf/intern/dds/dds_api.h b/source/blender/imbuf/intern/dds/dds_api.h index 2316fefce69..d911a163098 100644 --- a/source/blender/imbuf/intern/dds/dds_api.h +++ b/source/blender/imbuf/intern/dds/dds_api.h @@ -34,9 +34,9 @@ extern "C" { #include "../../IMB_imbuf.h" +int imb_is_a_dds(const unsigned char *mem); /* use only first 32 bytes of mem */ int imb_save_dds(struct ImBuf *ibuf, const char *name, int flags); -int imb_is_a_dds(unsigned char *mem); /* use only first 32 bytes of mem */ -struct ImBuf *imb_load_dds(unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]); +struct ImBuf *imb_load_dds(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]); #ifdef __cplusplus } |