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:
authorHans Goudey <h.goudey@me.com>2020-10-18 00:36:02 +0300
committerHans Goudey <h.goudey@me.com>2020-10-18 00:36:02 +0300
commitf425f40c4e17e889c720647b26c07ae3f6d3ba64 (patch)
treeb8b42d0862def239c0a05d2b3cae452aba68464d /source/blender/windowmanager/intern/wm_keymap.c
parent85e78fa17cd54676b5aa9a15a0b885b4a7187086 (diff)
Cleanup: More miscellaneous code quality changes in wm directory
- Declare variables where initialized. - Use LISTBASE_FOREACH macro. - Reduce variable scope. - Return early or reduce indentation in some cases.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_keymap.c')
-rw-r--r--source/blender/windowmanager/intern/wm_keymap.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c
index 3d9ca281897..3b792744d40 100644
--- a/source/blender/windowmanager/intern/wm_keymap.c
+++ b/source/blender/windowmanager/intern/wm_keymap.c
@@ -147,17 +147,12 @@ static void wm_keymap_item_properties_update_ot(wmKeyMapItem *kmi)
static void wm_keymap_item_properties_update_ot_from_list(ListBase *km_lb)
{
- wmKeyMap *km;
- wmKeyMapItem *kmi;
-
- for (km = km_lb->first; km; km = km->next) {
- wmKeyMapDiffItem *kmdi;
-
- for (kmi = km->items.first; kmi; kmi = kmi->next) {
+ LISTBASE_FOREACH (wmKeyMap *, km, km_lb) {
+ LISTBASE_FOREACH (wmKeyMapItem *, kmi, &km->items) {
wm_keymap_item_properties_update_ot(kmi);
}
- for (kmdi = km->diff_items.first; kmdi; kmdi = kmdi->next) {
+ LISTBASE_FOREACH (wmKeyMapDiffItem *, kmdi, &km->diff_items) {
if (kmdi->add_item) {
wm_keymap_item_properties_update_ot(kmdi->add_item);
}