From 7beb57f3bdf5d40aa4a3581367625ac7312b42a8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 28 Jun 2021 16:02:52 +1000 Subject: Cleanup: update comments --- source/blender/bmesh/intern/bmesh_operator_api_inline.h | 11 +++-------- source/blender/editors/interface/interface_align.c | 3 ++- source/blender/editors/space_view3d/view3d_fly.c | 3 --- source/blender/editors/space_view3d/view3d_walk.c | 3 --- 4 files changed, 5 insertions(+), 15 deletions(-) (limited to 'source') diff --git a/source/blender/bmesh/intern/bmesh_operator_api_inline.h b/source/blender/bmesh/intern/bmesh_operator_api_inline.h index 43628f01bc8..85701a76433 100644 --- a/source/blender/bmesh/intern/bmesh_operator_api_inline.h +++ b/source/blender/bmesh/intern/bmesh_operator_api_inline.h @@ -22,15 +22,10 @@ #pragma once -/* tool flag API. never, ever ever should tool code put junk in - * header flags (element->head.flag), nor should they use - * element->head.eflag1/eflag2. instead, use this api to set - * flags. - * - * if you need to store a value per element, use a - * ghash or a mapping slot to do it. */ +/* Tool Flag API: Tool code must never put junk in header flags (#BMHeader.hflag) + * instead, use this API to set flags. + * If you need to store a value per element, use a #GHash or a mapping slot to do it. */ -/* flags 15 and 16 (1 << 14 and 1 << 15) are reserved for bmesh api use */ ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2) BLI_INLINE short _bmo_elem_flag_test(BMesh *bm, const BMFlagLayer *oflags, const short oflag) { diff --git a/source/blender/editors/interface/interface_align.c b/source/blender/editors/interface/interface_align.c index 1f9c736a5f3..dbfdfbf7950 100644 --- a/source/blender/editors/interface/interface_align.c +++ b/source/blender/editors/interface/interface_align.c @@ -590,7 +590,8 @@ static void ui_block_align_calc_but(uiBut *first, short nr) /* rows == 0: 1 row, cols == 0: 1 column */ - /* note; how it uses 'flag' in loop below (either set it, or OR it) is confusing */ + /* NOTE: manipulation of 'flag' in the loop below is confusing. + * In some cases it's assigned, other times OR is used. */ for (but = first, prev = NULL; but && but->alignnr == nr; prev = but, but = but->next) { next = but->next; if (next && next->alignnr != nr) { diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c index c0a95f24f08..3347de73d01 100644 --- a/source/blender/editors/space_view3d/view3d_fly.c +++ b/source/blender/editors/space_view3d/view3d_fly.c @@ -757,9 +757,6 @@ static int flyApply(bContext *C, FlyInfo *fly, bool is_confirm) #define FLY_ZUP_CORRECT_ACCEL 0.05f /* increase upright momentum each step */ #define FLY_SMOOTH_FAC 20.0f /* higher value less lag */ - /* fly mode - Shift+F - * a fly loop where the user can move the view as if they are flying - */ RegionView3D *rv3d = fly->rv3d; /* 3x3 copy of the view matrix so we can move along the view axis */ diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c index 84515d4a39b..370ed7d12cf 100644 --- a/source/blender/editors/space_view3d/view3d_walk.c +++ b/source/blender/editors/space_view3d/view3d_walk.c @@ -989,9 +989,6 @@ static int walkApply(bContext *C, WalkInfo *walk, bool is_confirm) #define WALK_MOVE_SPEED base_speed #define WALK_BOOST_FACTOR ((void)0, walk->speed_factor) - /* walk mode - Ctrl+Shift+F - * a walk loop where the user can move move the view as if they are in a walk game - */ RegionView3D *rv3d = walk->rv3d; ARegion *region = walk->region; -- cgit v1.2.3