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>2012-12-15 08:44:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-12-15 08:44:10 +0400
commit865b547b4426fa353aa9e1473b66c3af0d53ea4d (patch)
tree3a107536da0503afdd23ba4c69f9e6c92b29752e /source/blender/blenkernel/intern/modifier.c
parentcc32540c48ebf53a66b2f0df6ff8d0ca23dc4785 (diff)
add checks to style checker script for 'a . b' and 'a []'
also use BLI_findindex for modifiers_indexInObject
Diffstat (limited to 'source/blender/blenkernel/intern/modifier.c')
-rw-r--r--source/blender/blenkernel/intern/modifier.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index 25b70ce1793..5918879906a 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -623,12 +623,7 @@ int modifiers_isPreview(Object *ob)
int modifiers_indexInObject(Object *ob, ModifierData *md_seek)
{
- int i = 0;
- ModifierData *md;
-
- for (md = ob->modifiers.first; (md && md_seek != md); md = md->next, i++) ;
- if (!md) return -1; /* modifier isn't in the object */
- return i;
+ return BLI_findindex(&ob->modifiers, md_seek);
}
void modifier_freeTemporaryData(ModifierData *md)