Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-07-11 16:52:18 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-07-11 18:07:59 +0300
commit2410797ab15d08e5138b8cf10d8f8246513935af (patch)
tree7b256ebb075babe33fc307c8b536c48b24bbd4ee /source/blender/imbuf/intern/bmp.c
parent03d8907ca7564c88c9f5357be93a74adbc638665 (diff)
ImBuf: cleanup, use const for memory passed in
Diffstat (limited to 'source/blender/imbuf/intern/bmp.c')
-rw-r--r--source/blender/imbuf/intern/bmp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/imbuf/intern/bmp.c b/source/blender/imbuf/intern/bmp.c
index 298e2da965f..6c082e8828c 100644
--- a/source/blender/imbuf/intern/bmp.c
+++ b/source/blender/imbuf/intern/bmp.c
@@ -81,7 +81,7 @@ typedef struct BMPHEADER {
CHECK_HEADER_FIELD(_mem, "IC") || \
CHECK_HEADER_FIELD(_mem, "PT"))
-static int checkbmp(unsigned char *mem)
+static int checkbmp(const unsigned char *mem)
{
int ret_val = 0;
@@ -115,17 +115,18 @@ static int checkbmp(unsigned char *mem)
return(ret_val);
}
-int imb_is_a_bmp(unsigned char *buf)
+int imb_is_a_bmp(const unsigned char *buf)
{
return checkbmp(buf);
}
-struct ImBuf *imb_bmp_decode(unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE])
+struct ImBuf *imb_bmp_decode(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE])
{
struct ImBuf *ibuf = NULL;
BMPINFOHEADER bmi;
int x, y, depth, ibuf_depth, skip, i, j;
- unsigned char *bmp, *rect;
+ const unsigned char *bmp;
+ unsigned char *rect;
unsigned short col;
double xppm, yppm;
bool top_to_bottom = false;