diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-26 18:24:11 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-26 18:25:16 +0400 |
commit | 7ca74fc1c008355b84c08bcadb56ea6acabce2f3 (patch) | |
tree | 6823cc2e0945928dbabb3e4735380128d61eace2 /source/blender/imbuf | |
parent | 88a0fe5f1bc52ebd918be1f63af57cf0f9d594d1 (diff) |
Code cleanup: use 'const' for arrays (blenloader, gpu, imbuf, makesdna, modifiers, nodes)
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r-- | source/blender/imbuf/intern/colormanagement.c | 4 | ||||
-rw-r--r-- | source/blender/imbuf/intern/divers.c | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/filter.c | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/imageprocess.c | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/iris.c | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/scaling.c | 6 |
6 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c index 8aa9615feac..50c44c2cca4 100644 --- a/source/blender/imbuf/intern/colormanagement.c +++ b/source/blender/imbuf/intern/colormanagement.c @@ -1237,7 +1237,7 @@ const char *IMB_colormanagement_get_rect_colorspace(ImBuf *ibuf) typedef struct DisplayBufferThread { ColormanageProcessor *cm_processor; - float *buffer; + const float *buffer; unsigned char *byte_buffer; float *display_buffer; @@ -1258,7 +1258,7 @@ typedef struct DisplayBufferThread { typedef struct DisplayBufferInitData { ImBuf *ibuf; ColormanageProcessor *cm_processor; - float *buffer; + const float *buffer; unsigned char *byte_buffer; float *display_buffer; diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c index 0bd5c5c6ed6..f896d975326 100644 --- a/source/blender/imbuf/intern/divers.c +++ b/source/blender/imbuf/intern/divers.c @@ -567,7 +567,7 @@ void IMB_rect_from_float(ImBuf *ibuf) /* converts from linear float to sRGB byte for part of the texture, buffer will hold the changed part */ void IMB_partial_rect_from_float(ImBuf *ibuf, float *buffer, int x, int y, int w, int h, bool is_data) { - float *rect_float; + const float *rect_float; uchar *rect_byte; int profile_from = IB_PROFILE_LINEAR_RGB; diff --git a/source/blender/imbuf/intern/filter.c b/source/blender/imbuf/intern/filter.c index c7491a00a55..352e230068b 100644 --- a/source/blender/imbuf/intern/filter.c +++ b/source/blender/imbuf/intern/filter.c @@ -263,7 +263,7 @@ void IMB_filter(struct ImBuf *ibuf) void IMB_mask_filter_extend(char *mask, int width, int height) { - char *row1, *row2, *row3; + const char *row1, *row2, *row3; int rowlen, x, y; char *temprect; diff --git a/source/blender/imbuf/intern/imageprocess.c b/source/blender/imbuf/intern/imageprocess.c index e0a6e034f94..4cdfc295749 100644 --- a/source/blender/imbuf/intern/imageprocess.c +++ b/source/blender/imbuf/intern/imageprocess.c @@ -221,7 +221,7 @@ void bilinear_interpolation(ImBuf *in, ImBuf *out, float u, float v, int xout, i /* NEAREST INTERPOLATION */ void nearest_interpolation_color(struct ImBuf *in, unsigned char outI[4], float outF[4], float u, float v) { - float *dataF; + const float *dataF; unsigned char *dataI; int y1, x1; diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c index ac1bb246dce..8f98f240053 100644 --- a/source/blender/imbuf/intern/iris.c +++ b/source/blender/imbuf/intern/iris.c @@ -72,7 +72,7 @@ typedef struct { unsigned int offset; unsigned int rleend; /* for rle images */ unsigned int *rowstart; /* for rle images */ - int *rowsize; /* for rle images */ + const int *rowsize; /* for rle images */ } IMAGE; #define RINTLUM (79) diff --git a/source/blender/imbuf/intern/scaling.c b/source/blender/imbuf/intern/scaling.c index d9cec1f3047..34253cd227c 100644 --- a/source/blender/imbuf/intern/scaling.c +++ b/source/blender/imbuf/intern/scaling.c @@ -618,7 +618,7 @@ static void enlarge_picture_float( y_src = 0; for (y_dst = 0; y_dst < dst_height; y_dst++) { float *line1 = src + ((int) y_src) * 4 * src_width; - float *line2 = line1 + 4 * src_width; + const float *line2 = line1 + 4 * src_width; const float weight1y = (float)(1.0 - (y_src - (int) y_src)); const float weight2y = 1.0f - weight1y; @@ -684,7 +684,7 @@ static void shrink_picture_float( float dx_dst, x_dst; float dy_dst, y_dst; float y_counter; - float *dst_begin = dst; + const float *dst_begin = dst; struct scale_outpix_float *dst_line1; struct scale_outpix_float *dst_line2; @@ -702,7 +702,7 @@ static void shrink_picture_float( y_dst = 0; y_counter = 1.0; for (y_src = 0; y_src < src_height; y_src++) { - float *line = src + y_src * 4 * src_width; + const float *line = src + y_src * 4 * src_width; uintptr_t weight1y = 1.0f - (y_dst - (int) y_dst); uintptr_t weight2y = 1.0f - weight1y; x_dst = 0; |