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-08-18 20:16:13 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-18 20:16:13 +0400
commit27b4b45543c0f7690a1978a60591a0b5c0f1adbb (patch)
tree14c54494059de30d8d4c8a24ec8400b8bcc83ff5 /source/blender/editors/interface/resources.c
parente982e9b04f13be046d194643ed28aaedd6181f3b (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.c4
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");