diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-26 18:22:49 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-26 18:25:15 +0400 |
commit | c67bd49e5607cc3db7446d4b12e1346fc9b2c83a (patch) | |
tree | bffbca1613b3ce8a5e356110c0d35b38dd6537cf /source/blender/editors/screen | |
parent | f2d25975b5e90f89744be733b81462493dc57977 (diff) |
Code cleanup: use 'const' for arrays (editors)
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/glutil.c | 8 | ||||
-rw-r--r-- | source/blender/editors/screen/screendump.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index 6b5f5a1a9ae..3feabef2c5f 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -502,7 +502,7 @@ static int get_cached_work_texture(int *r_w, int *r_h) void glaDrawPixelsTexScaled(float x, float y, int img_w, int img_h, int format, int type, int zoomfilter, void *rect, float scaleX, float scaleY) { unsigned char *uc_rect = (unsigned char *) rect; - float *f_rect = (float *)rect; + const float *f_rect = (float *)rect; float xzoom = glaGetOneFloat(GL_ZOOM_X), yzoom = glaGetOneFloat(GL_ZOOM_Y); int ltexid = glaGetOneInteger(GL_TEXTURE_2D); int lrowlength = glaGetOneInteger(GL_UNPACK_ROW_LENGTH); @@ -692,17 +692,17 @@ void glaDrawPixelsSafe(float x, float y, int img_w, int img_h, int row_w, int fo glPixelStorei(GL_UNPACK_ROW_LENGTH, row_w); if (format == GL_LUMINANCE || format == GL_RED) { if (type == GL_FLOAT) { - float *f_rect = (float *)rect; + const float *f_rect = (float *)rect; glDrawPixels(draw_w, draw_h, format, type, f_rect + (off_y * row_w + off_x)); } else if (type == GL_INT || type == GL_UNSIGNED_INT) { - int *i_rect = (int *)rect; + const int *i_rect = (int *)rect; glDrawPixels(draw_w, draw_h, format, type, i_rect + (off_y * row_w + off_x)); } } else { /* RGBA */ if (type == GL_FLOAT) { - float *f_rect = (float *)rect; + const float *f_rect = (float *)rect; glDrawPixels(draw_w, draw_h, format, type, f_rect + (off_y * row_w + off_x) * 4); } else if (type == GL_UNSIGNED_BYTE) { diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c index c5ca5ab921f..be5fd48b41a 100644 --- a/source/blender/editors/screen/screendump.c +++ b/source/blender/editors/screen/screendump.c @@ -301,8 +301,8 @@ typedef struct ScreenshotJob { wmWindowManager *wm; unsigned int *dumprect; int x, y, dumpsx, dumpsy; - short *stop; - short *do_update; + const short *stop; + const short *do_update; ReportList reports; } ScreenshotJob; |