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:
authorSybren A. Stüvel <sybren@blender.org>2020-07-03 16:59:48 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-07-03 17:15:01 +0300
commit4283da83cc9e307e6e5ce03916bb08a2adb02eba (patch)
treed15810f2114fc2aeeb9c076cb57b36d85d03a6e6 /source/blender/editors/screen/screen_geometry.c
parentde7c9f41e613a704f8e3258050b952d2ada60083 (diff)
Cleanup: Explicit return in each `else if` block in `ed_screen_context()`
The `ed_screen_context()` function is approximately 700 lines long, and its main structure is a huge chain of `else if` statements. Some of the bodies did not return, but rather fell through and relied on the `return -1;` at the bottom of the function. This means that in order to truly understand what is going on in one of those `else if` blocks, it could be required to scroll past all the following `else if` blocks, double-checking that they all had an `else`, and then see what happens below. By adding explicit `return -1;` everywhere this happened, this is all avoided, increasing local understandability of the code. Furthermore, it makes the upcoming cleanup with the Clang-Tidy rule `readability-else-after-return` a lot easier to do. No functional changes.
Diffstat (limited to 'source/blender/editors/screen/screen_geometry.c')
0 files changed, 0 insertions, 0 deletions