From 8198de0b0b115a0d795e3cfcfafef7cc092d9aa0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 9 Aug 2023 11:13:55 +1000 Subject: [PATCH] Cleanup: format disabled code (missed in recent cleanup) --- source/blender/draw/intern/draw_manager_c.cc | 3 +- .../blender/editors/physics/particle_edit.cc | 54 +++++-------------- .../transform/transform_convert_mesh.cc | 3 +- .../blender/windowmanager/intern/wm_window.cc | 6 +-- 4 files changed, 17 insertions(+), 49 deletions(-) diff --git a/source/blender/draw/intern/draw_manager_c.cc b/source/blender/draw/intern/draw_manager_c.cc index a176199c3ad..349e7e61fbd 100644 --- a/source/blender/draw/intern/draw_manager_c.cc +++ b/source/blender/draw/intern/draw_manager_c.cc @@ -2834,8 +2834,7 @@ void DRW_draw_select_id(Depsgraph *depsgraph, ARegion *region, View3D *v3d, cons drw_engines_cache_finish(); drw_task_graph_deinit(); -#if 0 /* This is a workaround to a nasty bug that seems to be a nasty driver bug. (See \ - #69377) */ +#if 0 /* This is a workaround to a nasty bug that seems to be a nasty driver bug (see #69377). */ DRW_render_instance_buffer_finish(); #else DST.buffer_finish_called = true; diff --git a/source/blender/editors/physics/particle_edit.cc b/source/blender/editors/physics/particle_edit.cc index 27b1f58677e..e7d4a81697d 100644 --- a/source/blender/editors/physics/particle_edit.cc +++ b/source/blender/editors/physics/particle_edit.cc @@ -4001,49 +4001,19 @@ static void brush_puff(PEData *data, int point_index, float mouse_distance) /* NOLINTNEXTLINE: readability-redundant-preprocessor */ # if 0 /* Kind of works but looks worse than what's below. */ + /* Move the unselected point on a vector based on the + * hair direction and the offset */ + float c1[3], c2[3]; + sub_v3_v3v3(dco, lastco, co); + mul_mat3_m4_v3(imat, dco); /* into particle space */ - - - - - - - - - - - - - - -/* Move the unselected point on a vector based on the -* hair direction and the offset */ -float c1[3], c2[3]; -sub_v3_v3v3(dco, lastco, co); -mul_mat3_m4_v3(imat, dco); /* into particle space */ - - - - - - - - - - - - - - - - -/* move the point along a vector perpendicular to the -* hairs direction, reduces odd kinks, */ -cross_v3_v3v3(c1, ofs, dco); -cross_v3_v3v3(c2, c1, dco); -normalize_v3(c2); -mul_v3_fl(c2, len_v3(ofs)); -add_v3_v3(key->co, c2); + /* move the point along a vector perpendicular to the + * hairs direction, reduces odd kinks, */ + cross_v3_v3v3(c1, ofs, dco); + cross_v3_v3v3(c2, c1, dco); + normalize_v3(c2); + mul_v3_fl(c2, len_v3(ofs)); + add_v3_v3(key->co, c2); # else /* Move the unselected point on a vector based on the * the normal of the closest geometry */ diff --git a/source/blender/editors/transform/transform_convert_mesh.cc b/source/blender/editors/transform/transform_convert_mesh.cc index 77dfeccc1da..e8c7e0bbeaf 100644 --- a/source/blender/editors/transform/transform_convert_mesh.cc +++ b/source/blender/editors/transform/transform_convert_mesh.cc @@ -1337,8 +1337,7 @@ void transform_convert_mesh_crazyspace_detect(TransInfo *t, * correction with \a quats, relative to the coordinates after * the modifiers that support deform matrices \a defcos. */ -#if 0 /* TODO(@ideasman42): fix crazy-space & extrude so it can be enabled for general use. \ - */ +#if 0 /* TODO(@ideasman42): fix crazy-space & extrude so it can be enabled for general use. */ if ((totleft > 0) || (totleft == -1)) #else if (totleft > 0) diff --git a/source/blender/windowmanager/intern/wm_window.cc b/source/blender/windowmanager/intern/wm_window.cc index c00f4e67ab2..ab2af8b0384 100644 --- a/source/blender/windowmanager/intern/wm_window.cc +++ b/source/blender/windowmanager/intern/wm_window.cc @@ -1355,9 +1355,9 @@ static bool ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_pt wm_window_make_drawable(wm, win); #if 0 -/* NOTE(@ideasman42): Ideally we could swap-buffers to avoid a full redraw. -* however this causes window flickering on resize with LIBDECOR under WAYLAND. */ -wm_window_swap_buffers(win); + /* NOTE(@ideasman42): Ideally we could swap-buffers to avoid a full redraw. + * however this causes window flickering on resize with LIBDECOR under WAYLAND. */ + wm_window_swap_buffers(win); #else WM_event_add_notifier(C, NC_WINDOW, nullptr); #endif