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>2010-08-22 18:15:28 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-08-22 18:15:28 +0400
commit0bab23633a07942586f963c19d053f26c44d799b (patch)
tree77065471bb213e0c782aa955eb77d1ca3a728d88 /source/blender/blenkernel/intern/action.c
parent96429a4792cb2b30c8e96ab6cedcd3f6c884fc38 (diff)
remove inline loops in a few places
replace with defgroup_find_name() and BLI_findstring()
Diffstat (limited to 'source/blender/blenkernel/intern/action.c')
-rw-r--r--source/blender/blenkernel/intern/action.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index 41ff3fed8a5..90a3a6ce664 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -368,20 +368,12 @@ void action_groups_remove_channel (bAction *act, FCurve *fcu)
/* Find a group with the given name */
bActionGroup *action_groups_find_named (bAction *act, const char name[])
{
- bActionGroup *grp;
-
/* sanity checks */
if (ELEM3(NULL, act, act->groups.first, name) || (name[0] == 0))
return NULL;
/* do string comparisons */
- for (grp= act->groups.first; grp; grp= grp->next) {
- if (strcmp(grp->name, name) == 0)
- return grp;
- }
-
- /* not found */
- return NULL;
+ return BLI_findstring(&act->groups, name, offsetof(bActionGroup, name));
}
/* *************** Pose channels *************** */