diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-27 13:20:10 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-27 13:20:10 +0400 |
commit | 09aadea2cc26f710a73ba524b076eebada8c93b5 (patch) | |
tree | 653d741706b53bf511a296ce5650a659bb1e5026 /source/blender | |
parent | e2ece45fec69c5ddefaba9ded8bdb358f9a84b8d (diff) |
remove unused code from object convert and indent.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/text.c | 10 | ||||
-rw-r--r-- | source/blender/editors/object/object_add.c | 10 | ||||
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tree.c | 4 |
3 files changed, 6 insertions, 18 deletions
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index 0daa9de3ae2..f0c01e25598 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -2624,10 +2624,6 @@ void txt_indent(Text *text) return; } - if (!text) return; - if (!text->curl) return; - if (!text->sell) return; - /* insert spaces rather than tabs */ if (text->flags & TXT_TABSTOSPACES) { add = tab_to_spaces; @@ -2687,9 +2683,9 @@ void txt_unindent(Text *text) /* hardcoded: TXT_TABSIZE = 4 spaces: */ int spaceslen = TXT_TABSIZE; - if (!text) return; - if (!text->curl) return; - if (!text->sell) return; + if (ELEM3(NULL, text, text->curl, text->sell)) { + return; + } /* insert spaces rather than tabs */ if (text->flags & TXT_TABSTOSPACES) { diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 5b100d7b6c2..ce61b4fce50 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1431,7 +1431,7 @@ static int convert_exec(bContext *C, wmOperator *op) { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); - Base *basen = NULL, *basact = NULL, *basedel = NULL; + Base *basen = NULL, *basact = NULL; Object *ob, *ob1, *newob, *obact = CTX_data_active_object(C); DerivedMesh *dm; Curve *cu; @@ -1687,14 +1687,6 @@ static int convert_exec(bContext *C, wmOperator *op) DAG_id_tag_update(&ob->id, OB_RECALC_DATA); ((ID *)ob->data)->flag &= ~LIB_DOIT; /* flag not to convert this datablock again */ } - - /* delete original if needed */ - if (basedel) { - if (!keep_original) - ED_base_object_free_and_unlink(bmain, scene, basedel); - - basedel = NULL; - } } CTX_DATA_END; diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 7d3ec148662..eb33d799dff 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -1140,7 +1140,7 @@ static int need_add_seq_dup(Sequence *seq) */ p = seq->prev; while (p) { - if ((!p->strip) || (!p->strip->stripdata) || (!p->strip->stripdata->name)) { + if ((!p->strip) || (!p->strip->stripdata)) { p = p->prev; continue; } @@ -1152,7 +1152,7 @@ static int need_add_seq_dup(Sequence *seq) p = seq->next; while (p) { - if ((!p->strip) || (!p->strip->stripdata) || (!p->strip->stripdata->name)) { + if ((!p->strip) || (!p->strip->stripdata)) { p = p->next; continue; } |