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_stereo.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_stereo.c')
-rw-r--r--source/blender/windowmanager/intern/wm_stereo.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/windowmanager/intern/wm_stereo.c b/source/blender/windowmanager/intern/wm_stereo.c
index be6f1079279..fb9c71163c8 100644
--- a/source/blender/windowmanager/intern/wm_stereo.c
+++ b/source/blender/windowmanager/intern/wm_stereo.c
@@ -262,10 +262,10 @@ static bool wm_stereo3d_set_properties(bContext *UNUSED(C), wmOperator *op)
static void wm_stereo3d_set_init(bContext *C, wmOperator *op)
{
- Stereo3dData *s3dd;
wmWindow *win = CTX_wm_window(C);
- op->customdata = s3dd = MEM_callocN(sizeof(Stereo3dData), __func__);
+ Stereo3dData *s3dd = MEM_callocN(sizeof(Stereo3dData), __func__);
+ op->customdata = s3dd;
/* store the original win stereo 3d settings in case of cancel */
s3dd->stereo3d_format = *win->stereo3d_format;
@@ -278,7 +278,6 @@ int wm_stereo3d_set_exec(bContext *C, wmOperator *op)
wmWindow *win_dst = NULL;
const bool is_fullscreen = WM_window_is_fullscreen(win_src);
char prev_display_mode = win_src->stereo3d_format->display_mode;
- Stereo3dData *s3dd;
bool ok = true;
if (G.background) {
@@ -291,7 +290,7 @@ int wm_stereo3d_set_exec(bContext *C, wmOperator *op)
wm_stereo3d_set_properties(C, op);
}
- s3dd = op->customdata;
+ Stereo3dData *s3dd = op->customdata;
*win_src->stereo3d_format = s3dd->stereo3d_format;
if (prev_display_mode == S3D_DISPLAY_PAGEFLIP &&