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>2014-04-26 18:22:49 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-04-26 18:25:15 +0400
commitc67bd49e5607cc3db7446d4b12e1346fc9b2c83a (patch)
treebffbca1613b3ce8a5e356110c0d35b38dd6537cf /source/blender/editors/space_sequencer
parentf2d25975b5e90f89744be733b81462493dc57977 (diff)
Code cleanup: use 'const' for arrays (editors)
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_scopes.c16
-rw-r--r--source/blender/editors/space_sequencer/sequencer_select.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_view.c4
3 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_scopes.c b/source/blender/editors/space_sequencer/sequencer_scopes.c
index 9199c6de343..9b3b9f23036 100644
--- a/source/blender/editors/space_sequencer/sequencer_scopes.c
+++ b/source/blender/editors/space_sequencer/sequencer_scopes.c
@@ -206,7 +206,7 @@ static ImBuf *make_waveform_view_from_ibuf_float(ImBuf *ibuf)
unsigned char *last_p = NULL;
for (x = 0; x < ibuf->x; x++) {
- float *rgb = src + 4 * (ibuf->x * y + x);
+ const float *rgb = src + 4 * (ibuf->x * y + x);
float v = rgb_to_luma(rgb);
unsigned char *p = tgt;
@@ -309,7 +309,7 @@ static ImBuf *make_sep_waveform_view_from_ibuf_float(ImBuf *ibuf)
for (x = 0; x < ibuf->x; x++) {
int c;
- float *rgb = src + 4 * (ibuf->x * y + x);
+ const float *rgb = src + 4 * (ibuf->x * y + x);
for (c = 0; c < 3; c++) {
unsigned char *p = tgt;
float v = rgb[c];
@@ -379,7 +379,7 @@ static void draw_zebra_byte(ImBuf *src, ImBuf *ibuf, float perc)
static void draw_zebra_float(ImBuf *src, ImBuf *ibuf, float perc)
{
float limit = perc / 100.0f;
- float *p = src->rect_float;
+ const float *p = src->rect_float;
unsigned char *o = (unsigned char *) ibuf->rect;
int x;
int y;
@@ -545,7 +545,7 @@ static ImBuf *make_histogram_view_from_ibuf_float(ImBuf *ibuf)
memset(cur_bins, 0, sizeof(cur_bins));
for (x = 0; x < ibuf->x; x++) {
- float *pixel = src + (y * ibuf->x + x) * 4;
+ const float *pixel = src + (y * ibuf->x + x) * 4;
cur_bins[0][get_bin_float(pixel[0])]++;
cur_bins[1][get_bin_float(pixel[1])]++;
@@ -658,8 +658,8 @@ static ImBuf *make_vectorscope_view_from_ibuf_byte(ImBuf *ibuf)
for (y = 0; y < ibuf->y; y++) {
for (x = 0; x < ibuf->x; x++) {
- char *src1 = src + 4 * (ibuf->x * y + x);
- char *p;
+ const char *src1 = src + 4 * (ibuf->x * y + x);
+ const char *p;
rgb[0] = (float)src1[0] / 255.0f;
rgb[1] = (float)src1[1] / 255.0f;
@@ -704,8 +704,8 @@ static ImBuf *make_vectorscope_view_from_ibuf_float(ImBuf *ibuf)
for (y = 0; y < ibuf->y; y++) {
for (x = 0; x < ibuf->x; x++) {
- float *src1 = src + 4 * (ibuf->x * y + x);
- char *p;
+ const float *src1 = src + 4 * (ibuf->x * y + x);
+ const char *p;
memcpy(rgb, src1, 3 * sizeof(float));
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c
index cfae0056a35..a5d7944ac3a 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.c
+++ b/source/blender/editors/space_sequencer/sequencer_select.c
@@ -980,7 +980,7 @@ static bool select_grouped_data(Editing *ed, Sequence *actseq)
{
Sequence *seq;
bool changed = false;
- char *dir = actseq->strip ? actseq->strip->dir : NULL;
+ const char *dir = actseq->strip ? actseq->strip->dir : NULL;
if (!SEQ_USE_DATA(actseq))
return changed;
diff --git a/source/blender/editors/space_sequencer/sequencer_view.c b/source/blender/editors/space_sequencer/sequencer_view.c
index cad25663609..7fdbc9cc7de 100644
--- a/source/blender/editors/space_sequencer/sequencer_view.c
+++ b/source/blender/editors/space_sequencer/sequencer_view.c
@@ -70,7 +70,7 @@ typedef struct ImageSampleInfo {
float linearcol[4];
unsigned char *colp;
- float *colfp;
+ const float *colfp;
int draw;
int color_manage;
@@ -110,7 +110,7 @@ static void sample_apply(bContext *C, wmOperator *op, const wmEvent *event)
fy += (float) ibuf->y / 2.0f;
if (fx >= 0.0f && fy >= 0.0f && fx < ibuf->x && fy < ibuf->y) {
- float *fp;
+ const float *fp;
unsigned char *cp;
int x = (int) fx, y = (int) fy;