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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-07-13 18:16:59 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-13 18:16:59 +0400
commit1c15beb6b225826c0a0d83d4df58a0bac7ce0ed5 (patch)
treef6a783323a6f1d8d2375ff4f7fbe8523dd1141e9 /source
parent0ea078ad03b53d860a427dbf8cad1b7f8002dd7c (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')
-rw-r--r--source/blender/blenloader/intern/versioning_legacy.c2
-rw-r--r--source/blender/editors/animation/anim_markers.c2
-rw-r--r--source/blender/editors/interface/interface_regions.c2
-rw-r--r--source/blender/editors/space_file/filelist.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c7
-rw-r--r--source/blender/imbuf/intern/colormanagement.c6
-rw-r--r--source/blender/modifiers/intern/MOD_screw.c2
7 files changed, 7 insertions, 16 deletions
diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c
index c6856d8b71d..82040020ce4 100644
--- a/source/blender/blenloader/intern/versioning_legacy.c
+++ b/source/blender/blenloader/intern/versioning_legacy.c
@@ -354,7 +354,7 @@ static void alphasort_version_246(FileData *fd, Library *lib, Mesh *me)
ma = NULL;
for (b = 0; ma && b < MAX_MTEX; b++)
- if (ma->mtex && ma->mtex[b] && ma->mtex[b]->mapto & MAP_ALPHA)
+ if (ma->mtex[b] && ma->mtex[b]->mapto & MAP_ALPHA)
texalpha = 1;
}
else {
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:
diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c
index 235c6a0f37e..baaee8cb553 100644
--- a/source/blender/imbuf/intern/colormanagement.c
+++ b/source/blender/imbuf/intern/colormanagement.c
@@ -2448,11 +2448,7 @@ void IMB_colormanagement_colorspace_items_add(EnumPropertyItem **items, int *tot
item.name = colorspace->name;
item.identifier = colorspace->name;
item.icon = 0;
-
- if (colorspace->description)
- item.description = colorspace->description;
- else
- item.description = "";
+ item.description = colorspace->description;
RNA_enum_item_add(items, totitem, &item);
}
diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c
index 5faa1ecdaac..0d098db3203 100644
--- a/source/blender/modifiers/intern/MOD_screw.c
+++ b/source/blender/modifiers/intern/MOD_screw.c
@@ -636,7 +636,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
*
* Use the edge order to make the subtraction, flip the normal the right way
* edge should be there but check just in case... */
- if (vc->e && vc->e[0]->v1 == i) {
+ if (vc->e[0]->v1 == i) {
sub_v3_v3(tmp_vec1, tmp_vec2);
}
else {