diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-08-22 18:15:28 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-08-22 18:15:28 +0400 |
commit | 0bab23633a07942586f963c19d053f26c44d799b (patch) | |
tree | 77065471bb213e0c782aa955eb77d1ca3a728d88 /source/blender/editors/animation/keyingsets.c | |
parent | 96429a4792cb2b30c8e96ab6cedcd3f6c884fc38 (diff) |
remove inline loops in a few places
replace with defgroup_find_name() and BLI_findstring()
Diffstat (limited to 'source/blender/editors/animation/keyingsets.c')
-rw-r--r-- | source/blender/editors/animation/keyingsets.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index 0a58ad64e2f..ab236de9ac5 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -522,20 +522,12 @@ ListBase builtin_keyingsets = {NULL, NULL}; /* Find KeyingSet type info given a name */ KeyingSetInfo *ANIM_keyingset_info_find_named (const char name[]) { - KeyingSetInfo *ksi; - /* sanity checks */ if ((name == NULL) || (name[0] == 0)) return NULL; /* search by comparing names */ - for (ksi = keyingset_type_infos.first; ksi; ksi = ksi->next) { - if (strcmp(ksi->idname, name) == 0) - return ksi; - } - - /* no matches found */ - return NULL; + return BLI_findstring(&keyingset_type_infos, name, offsetof(KeyingSetInfo, idname)); } /* Find builtin KeyingSet by name */ |