diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-06-13 07:47:22 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-06-13 07:54:54 +0300 |
commit | ab382230471c6ee94e82d0fac3f5093e30710628 (patch) | |
tree | 9a07f5978a79a687fff983120018eb50f1092a51 /source/blender/windowmanager/intern | |
parent | f731bce6cd42eda9c1ca5962b8d1ec99254c478f (diff) |
Cleanup: redundant initialization
These were limited to obvious cases. Some less obvious cases
were kept as refactoring might make them necessary in future.
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index d0ee7075516..0aff2c00644 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -911,7 +911,10 @@ void wm_homefile_read(bContext *C, const char *app_template_override, bool *r_is_factory_startup) { - Main *bmain = G_MAIN; /* Context does not always have valid main pointer here... */ +#if 0 /* UNUSED, keep as this may be needed later & the comment below isn't self evident. */ + /* Context does not always have valid main pointer here. */ + Main *bmain = G_MAIN; +#endif ListBase wmbase; bool success = false; @@ -1170,7 +1173,7 @@ void wm_homefile_read(bContext *C, BLI_strncpy(U.app_template, app_template_override, sizeof(U.app_template)); } - bmain = CTX_data_main(C); + Main *bmain = CTX_data_main(C); if (use_userdef) { /* check userdef before open window, keymaps etc */ @@ -2482,12 +2485,11 @@ static void wm_open_mainfile_ui(bContext *UNUSED(C), wmOperator *op) { struct FileRuntime *file_info = (struct FileRuntime *)&op->customdata; uiLayout *layout = op->layout; - uiLayout *col = op->layout; const char *autoexec_text; uiItemR(layout, op->ptr, "load_ui", 0, NULL, ICON_NONE); - col = uiLayoutColumn(layout, false); + uiLayout *col = uiLayoutColumn(layout, false); if (file_info->is_untrusted) { autoexec_text = IFACE_("Trusted Source [Untrusted Path]"); uiLayoutSetActive(col, false); |