diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-13 18:16:59 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-13 18:16:59 +0400 |
commit | 1c15beb6b225826c0a0d83d4df58a0bac7ce0ed5 (patch) | |
tree | f6a783323a6f1d8d2375ff4f7fbe8523dd1141e9 /source/blender/editors | |
parent | 0ea078ad03b53d860a427dbf8cad1b7f8002dd7c (diff) |
remove NULL checks on fixed size arrays, also was calling BLI_testextensie_glob every time in the file selector with a blank string.
Diffstat (limited to 'source/blender/editors')
4 files changed, 4 insertions, 9 deletions
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index f3edb61f487..da76ad8a832 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -401,7 +401,7 @@ static void draw_marker(View2D *v2d, TimeMarker *marker, int cfra, int flag) glDisable(GL_BLEND); /* and the marker name too, shifted slightly to the top-right */ - if (marker->name && marker->name[0]) { + if (marker->name[0]) { float x, y; /* minimal y coordinate which wouldn't be occluded by scroll */ diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index 2e915d6357d..9c6a606333d 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -524,7 +524,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) if (but->rnapoin.id.data) { ID *id = but->rnapoin.id.data; - if (id->lib && id->lib->name) { + if (id->lib) { BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Library: %s"), id->lib->name); data->color_id[data->totline] = UI_TIP_LC_NORMAL; data->totline++; diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index f1e707f8802..7d7dccdf0e6 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -847,7 +847,7 @@ static void filelist_setfiletypes(struct FileList *filelist) } file->flags = file_extension_type(file->relname); - if (filelist->filter_glob && + if (filelist->filter_glob[0] && BLI_testextensie_glob(file->relname, filelist->filter_glob)) { file->flags = OPERATORFILE; diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index af4b4055156..0f4a2d8b4dd 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -162,12 +162,7 @@ static void get_seq_color3ubv(Scene *curscene, Sequence *seq, unsigned char col[ break; case SEQ_TYPE_COLOR: - if (colvars->col) { - rgb_float_to_uchar(col, colvars->col); - } - else { - col[0] = col[1] = col[2] = 128; - } + rgb_float_to_uchar(col, colvars->col); break; case SEQ_TYPE_SOUND_RAM: |