diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-18 20:16:13 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-18 20:16:13 +0400 |
commit | 27b4b45543c0f7690a1978a60591a0b5c0f1adbb (patch) | |
tree | 14c54494059de30d8d4c8a24ec8400b8bcc83ff5 /source/blender/editors/interface/resources.c | |
parent | e982e9b04f13be046d194643ed28aaedd6181f3b (diff) |
utility functions: BLI_findptr, BLI_rfindptr --- use for finding an item in a linked list by a pointer.
Diffstat (limited to 'source/blender/editors/interface/resources.c')
-rw-r--r-- | source/blender/editors/interface/resources.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 0ff81f27f6b..20e4360b791 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -643,9 +643,7 @@ void ui_theme_init_default(void) bTheme *btheme; /* we search for the theme with name Default */ - for (btheme = U.themes.first; btheme; btheme = btheme->next) { - if (strcmp("Default", btheme->name) == 0) break; - } + btheme = BLI_findstring(&U.themes, "Default", offsetof(bTheme, name)); if (btheme == NULL) { btheme = MEM_callocN(sizeof(bTheme), "theme"); |