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>2013-07-19 14:40:06 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-19 14:40:06 +0400
commitefc7b7a2853cfbcfb20c80e0d16db11109fad22f (patch)
treec36df877265ddac121b086868a31b2dd89103084 /source/blender/makesrna/intern/rna_wm.c
parenta926d9a0d4437943aa8658fd9c1a6c1d6f9c2042 (diff)
code cleanup: replace inline loop with BLI_findstring
Diffstat (limited to 'source/blender/makesrna/intern/rna_wm.c')
-rw-r--r--source/blender/makesrna/intern/rna_wm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 24eab621f5e..0d1c684e6a1 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -770,10 +770,8 @@ static PointerRNA rna_WindowManager_active_keyconfig_get(PointerRNA *ptr)
wmWindowManager *wm = ptr->data;
wmKeyConfig *kc;
- for (kc = wm->keyconfigs.first; kc; kc = kc->next)
- if (strcmp(kc->idname, U.keyconfigstr) == 0)
- break;
-
+ kc = BLI_findstring(&wm->keyconfigs, U.keyconfigstr, offsetof(wmKeyConfig, idname));
+
if (!kc)
kc = wm->defaultconf;