diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-02-22 18:12:55 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-02-22 18:12:55 +0400 |
commit | 4df5b943edeb7bb65a5b19c6130e1959966c2878 (patch) | |
tree | beb841832257c4d97c5c930662eaec53d39c3cc5 /source/blender/editors/object/object_modifier.c | |
parent | 7ad0790189c77c1f910578928e69be48cc7aad37 (diff) |
patch [#34103] - listbase.patch, insertlinkbefore.patch
from Lawrence D'Oliveiro (ldo)
notes from tracker:
use bool for return type from BLI_remlink_safe, necessitating including BLI_utildefines.h in BLI_listbase.h
get rid of duplicate BLI_insertlink, use BLI_insertlinkafter instead.
A few places which were using BLI_insertlinkafter (actually BLI_insertlink), when it would be simpler to use BLI_insertlinkbefore instead.
Diffstat (limited to 'source/blender/editors/object/object_modifier.c')
-rw-r--r-- | source/blender/editors/object/object_modifier.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 7c74fa24893..8d29813e2ac 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -385,7 +385,7 @@ int ED_object_modifier_move_up(ReportList *reports, Object *ob, ModifierData *md } BLI_remlink(&ob->modifiers, md); - BLI_insertlink(&ob->modifiers, md->prev->prev, md); + BLI_insertlinkbefore(&ob->modifiers, md->prev, md); } return 1; @@ -406,7 +406,7 @@ int ED_object_modifier_move_down(ReportList *reports, Object *ob, ModifierData * } BLI_remlink(&ob->modifiers, md); - BLI_insertlink(&ob->modifiers, md->next, md); + BLI_insertlinkafter(&ob->modifiers, md->next, md); } return 1; @@ -722,7 +722,7 @@ int ED_object_modifier_copy(ReportList *UNUSED(reports), Object *ob, ModifierDat nmd = modifier_new(md->type); modifier_copyData(md, nmd); - BLI_insertlink(&ob->modifiers, md, nmd); + BLI_insertlinkafter(&ob->modifiers, md, nmd); modifier_unique_name(&ob->modifiers, nmd); return 1; |