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/blenkernel/intern/property.c | |
parent | 96429a4792cb2b30c8e96ab6cedcd3f6c884fc38 (diff) |
remove inline loops in a few places
replace with defgroup_find_name() and BLI_findstring()
Diffstat (limited to 'source/blender/blenkernel/intern/property.c')
-rw-r--r-- | source/blender/blenkernel/intern/property.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/property.c b/source/blender/blenkernel/intern/property.c index a2ba7c69b93..d8001572b4f 100644 --- a/source/blender/blenkernel/intern/property.c +++ b/source/blender/blenkernel/intern/property.c @@ -32,6 +32,7 @@ #include <stdio.h> #include <stdlib.h> +#include <stddef.h> #include <string.h> #include <ctype.h> @@ -180,14 +181,7 @@ void unique_property(bProperty *first, bProperty *prop, int force) bProperty *get_ob_property(Object *ob, char *name) { - bProperty *prop; - - prop= ob->prop.first; - while(prop) { - if( strcmp(prop->name, name)==0 ) return prop; - prop= prop->next; - } - return NULL; + return BLI_findstring(&ob->prop, name, offsetof(bProperty, name)); } void set_ob_property(Object *ob, bProperty *propc) |