From 29c106924408a508b2f37af9e09d9eb46adc6fad Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 25 Jun 2018 12:02:57 +0200 Subject: Cleanup: code style --- source/blender/editors/interface/interface_icons.c | 5 ++--- source/blender/editors/object/object_add.c | 2 +- source/blender/editors/object/object_edit.c | 4 ++-- source/blender/editors/screen/screen_user_menu.c | 4 ++-- source/blender/editors/space_outliner/outliner_draw.c | 2 +- source/blender/editors/space_outliner/outliner_tree.c | 5 ++--- 6 files changed, 10 insertions(+), 12 deletions(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 64fca05c082..ec9112247e6 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -858,7 +858,7 @@ static void ui_studiolight_kill_icon_preview_job(wmWindowManager *wm, int icon_i icon->obj = NULL; } -static void ui_studiolight_free_function(StudioLight * sl, void* data) +static void ui_studiolight_free_function(StudioLight *sl, void* data) { wmWindowManager *wm = data; @@ -920,7 +920,7 @@ void ui_icon_ensure_deferred(const bContext *C, const int icon_id, const bool bi di->data.buffer.image = img; wmJob *wm_job = WM_jobs_get(wm, CTX_wm_window(C), icon, "StudioLight Icon", 0, WM_JOB_TYPE_STUDIOLIGHT); - Icon** tmp = MEM_callocN(sizeof(Icon*), __func__); + Icon **tmp = MEM_callocN(sizeof(Icon*), __func__); *tmp = icon; WM_jobs_customdata_set(wm_job, tmp, MEM_freeN); WM_jobs_timer(wm_job, 0.01, 0, NC_WINDOW); @@ -1647,4 +1647,3 @@ void UI_icon_draw_preview_aspect_size(float x, float y, int icon_id, float aspec { icon_draw_size(x, y, icon_id, aspect, alpha, NULL, ICON_SIZE_PREVIEW, size, false); } - diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 336e1075911..b216ebbad7c 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1016,7 +1016,7 @@ static int object_lamp_add_exec(bContext *C, wmOperator *op) float size = RNA_float_get(op->ptr, "radius"); /* Better defaults for lamp size. */ - switch(type) { + switch (type) { case LA_LOCAL: case LA_SPOT: break; diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 3139eb911e9..19bcb14f395 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -315,7 +315,8 @@ void ED_hide_collections_menu_draw(const bContext *C, uiLayout *layout) } if ((view_layer->runtime_flag & VIEW_LAYER_HAS_HIDE) && - !(lc->runtime_flag & LAYER_COLLECTION_HAS_VISIBLE_OBJECTS)) { + !(lc->runtime_flag & LAYER_COLLECTION_HAS_VISIBLE_OBJECTS)) + { uiLayoutSetActive(row, false); } @@ -2097,4 +2098,3 @@ void OBJECT_OT_link_to_collection(wmOperatorType *ot) "Name of the newly added collection"); RNA_def_property_flag(prop, PROP_SKIP_SAVE); } - diff --git a/source/blender/editors/screen/screen_user_menu.c b/source/blender/editors/screen/screen_user_menu.c index ab5a3a4008c..d942602c896 100644 --- a/source/blender/editors/screen/screen_user_menu.c +++ b/source/blender/editors/screen/screen_user_menu.c @@ -88,8 +88,8 @@ bUserMenuItem_Op *ED_screen_user_menu_item_find_operator( if (umi->type == USER_MENU_TYPE_OPERATOR) { bUserMenuItem_Op *umi_op = (bUserMenuItem_Op *)umi; if (STREQ(ot->idname, umi_op->opname) && - (opcontext == umi_op->opcontext) && - (IDP_EqualsProperties(prop, umi_op->prop))) + (opcontext == umi_op->opcontext) && + (IDP_EqualsProperties(prop, umi_op->prop))) { return umi_op; } diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 4368b74f8a7..64a9c901175 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -1516,7 +1516,7 @@ static void outliner_draw_iconrow( const int num_subtypes = (i == INDEX_ID_OB) ? OB_TYPE_MAX : 1; /* See tree_element_id_type_to_index for the index logic. */ int index_base = i; - if (i > INDEX_ID_OB){ + if (i > INDEX_ID_OB) { index_base += OB_TYPE_MAX; } for (int j = 0; j < num_subtypes; j++) { diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 13b62b766f5..01df653c86d 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -1493,7 +1493,8 @@ static void outliner_add_layer_collections_recursive( const bool exclude = (lc->flag & LAYER_COLLECTION_EXCLUDE) != 0; if (exclude || ((layer->runtime_flag & VIEW_LAYER_HAS_HIDE) && - !(lc->runtime_flag & LAYER_COLLECTION_HAS_VISIBLE_OBJECTS))) { + !(lc->runtime_flag & LAYER_COLLECTION_HAS_VISIBLE_OBJECTS))) + { ten->flag |= TE_DISABLED; } @@ -2268,5 +2269,3 @@ void outliner_build_tree(Main *mainvar, Scene *scene, ViewLayer *view_layer, Spa BKE_main_id_clear_newpoins(mainvar); } - - -- cgit v1.2.3