diff options
author | Julian Eisel <julian@blender.org> | 2020-03-06 18:56:42 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-03-06 19:19:23 +0300 |
commit | b2ee1770d4c31078518f4ec9edd5196a41345162 (patch) | |
tree | 6b7f6ff9057322245fc3b3407bece3f1c0cb3eb5 /source/blender/windowmanager/intern/wm_keymap.c | |
parent | b825a95ec311a169d33fe21e28418f11a516c82f (diff) |
Cleanup: Rename ARegion variables from ar to region
The old convention was easy to confuse with ScrArea.
Part of https://developer.blender.org/T74432.
This is mostly a batch rename with some manual fixing. Only single word
variable names are changed, no prefixed/suffixed names.
Brecht van Lommel and Campbell Barton both gave me a green light for
this convention change.
Also ran clan clang format on affected files.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_keymap.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_keymap.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c index 9d587ff9e9b..0aa146bbc83 100644 --- a/source/blender/windowmanager/intern/wm_keymap.c +++ b/source/blender/windowmanager/intern/wm_keymap.c @@ -1450,7 +1450,7 @@ static wmKeyMapItem *wm_keymap_item_find_props(const bContext *C, { wmWindow *win = CTX_wm_window(C); ScrArea *sa = CTX_wm_area(C); - ARegion *ar = CTX_wm_region(C); + ARegion *region = CTX_wm_region(C); wmKeyMapItem *found = NULL; /* look into multiple handler lists to find the item */ @@ -1471,40 +1471,40 @@ static wmKeyMapItem *wm_keymap_item_find_props(const bContext *C, if (found == NULL) { if (ELEM(opcontext, WM_OP_EXEC_REGION_WIN, WM_OP_INVOKE_REGION_WIN)) { if (sa) { - if (!(ar && ar->regiontype == RGN_TYPE_WINDOW)) { - ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW); + if (!(region && region->regiontype == RGN_TYPE_WINDOW)) { + region = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW); } - if (ar) { + if (region) { found = wm_keymap_item_find_handlers( - C, &ar->handlers, opname, opcontext, properties, is_strict, params, r_keymap); + C, ®ion->handlers, opname, opcontext, properties, is_strict, params, r_keymap); } } } else if (ELEM(opcontext, WM_OP_EXEC_REGION_CHANNELS, WM_OP_INVOKE_REGION_CHANNELS)) { - if (!(ar && ar->regiontype == RGN_TYPE_CHANNELS)) { - ar = BKE_area_find_region_type(sa, RGN_TYPE_CHANNELS); + if (!(region && region->regiontype == RGN_TYPE_CHANNELS)) { + region = BKE_area_find_region_type(sa, RGN_TYPE_CHANNELS); } - if (ar) { + if (region) { found = wm_keymap_item_find_handlers( - C, &ar->handlers, opname, opcontext, properties, is_strict, params, r_keymap); + C, ®ion->handlers, opname, opcontext, properties, is_strict, params, r_keymap); } } else if (ELEM(opcontext, WM_OP_EXEC_REGION_PREVIEW, WM_OP_INVOKE_REGION_PREVIEW)) { - if (!(ar && ar->regiontype == RGN_TYPE_PREVIEW)) { - ar = BKE_area_find_region_type(sa, RGN_TYPE_PREVIEW); + if (!(region && region->regiontype == RGN_TYPE_PREVIEW)) { + region = BKE_area_find_region_type(sa, RGN_TYPE_PREVIEW); } - if (ar) { + if (region) { found = wm_keymap_item_find_handlers( - C, &ar->handlers, opname, opcontext, properties, is_strict, params, r_keymap); + C, ®ion->handlers, opname, opcontext, properties, is_strict, params, r_keymap); } } else { - if (ar) { + if (region) { found = wm_keymap_item_find_handlers( - C, &ar->handlers, opname, opcontext, properties, is_strict, params, r_keymap); + C, ®ion->handlers, opname, opcontext, properties, is_strict, params, r_keymap); } } } |