diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-05-13 08:43:53 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-05-14 17:49:49 +0300 |
commit | 079f415debd85b44f9ceaca17edfb82517240448 (patch) | |
tree | fa7591fb909ac7a899c3b3024b1845fd6c21ad23 /source/blender/gpu/intern/gpu_capabilities_private.hh | |
parent | 265d97556aa0f0f2a0e4dd7584e3b8573bbddd54 (diff) |
Cleanup: use enum types for screen direction variables
The term direction was used in 3 different ways in screen editing code,
making it hard to follow:
- 0-3 for as magic numbers mapped to [west,north,east,south].
- `h`, `v` characters for [horizontal,vertical] axes.
- Cycle direction SPACE_CONTEXT_CYCLE_PREV, SPACE_CONTEXT_CYCLE_NEXT
The following changes have been made:
- Add `eScreenDir` for [west,north,east,south], use variable name `dir`.
- Add `eScreenAxis` for [horizontal,vertical] values, use variable name
`dir_axis`.
- Add `eScreenCycle` for existing enum `SPACE_CONTEXT_CYCLE_{PREV/NEXT}`.
- Add macros `SCREEN_DIR_IS_VERTICAL(dir)`,
`SCREEN_DIR_IS_HORIZONTAL(dir)`.
Replacing `ELEM(dir, 1, 3)`, `ELEM(dir, 0, 2)`.
- Move `ED_screen_draw_join_highlight`, `ED_screen_draw_split_preview`
to `screen_intern.h`.
Reviewed By: Severin
Ref D11245
Diffstat (limited to 'source/blender/gpu/intern/gpu_capabilities_private.hh')
0 files changed, 0 insertions, 0 deletions