1
1

Cleanup: spelling in comments

This commit is contained in:
2021-10-26 22:24:56 +11:00
parent ddf97d6270
commit 6d3d2988fa
9 changed files with 25 additions and 23 deletions

View File

@@ -316,8 +316,8 @@ class Formatter {
class JsonFormatter : public Formatter {
public:
/**
* The identation level to use.
* Typically number of chars. Set to 0 to not use identation.
* The indentation level to use.
* Typically number of chars. Set to 0 to not use indentation.
*/
int8_t indentation_len = 0;
@@ -327,4 +327,3 @@ class JsonFormatter : public Formatter {
};
} // namespace blender::io::serialize

View File

@@ -10780,7 +10780,7 @@ static int ui_handle_menu_event(bContext *C,
}
#endif
/* Don't handle double click events, rehandle as regular press/release. */
/* Don't handle double click events, re-handle as regular press/release. */
if (retval == WM_UI_HANDLER_CONTINUE && event->val == KM_DBL_CLICK) {
return retval;
}

View File

@@ -167,7 +167,7 @@ static void view2d_masks(View2D *v2d, const rcti *mask_scroll)
scroll = view2d_scroll_mapped(v2d->scroll);
/* scrollers are based off regionsize
/* Scrollers are based off region-size:
* - they can only be on one to two edges of the region they define
* - if they overlap, they must not occupy the corners (which are reserved for other widgets)
*/

View File

@@ -2642,8 +2642,10 @@ static int drop_named_material_invoke(bContext *C, wmOperator *op, const wmEvent
return OPERATOR_FINISHED;
}
/* used for dropbox */
/* assigns to object under cursor, only first material slot */
/**
* Used for drop-box.
* Assigns to object under cursor, only first material slot.
*/
void OBJECT_OT_drop_named_material(wmOperatorType *ot)
{
/* identifiers */

View File

@@ -1940,7 +1940,7 @@ void ED_area_init(wmWindowManager *wm, wmWindow *win, ScrArea *area)
rcti window_rect;
WM_window_rect_calc(win, &window_rect);
/* set typedefinitions */
/* Set type-definitions. */
area->type = BKE_spacetype_from_id(area->spacetype);
if (area->type == NULL) {
@@ -3027,7 +3027,7 @@ void ED_region_panels_layout_ex(const bContext *C,
search_filter);
}
/* Draw "polyinstantaited" panels that don't have a 1 to 1 correspondence with their types. */
/* Draw "poly-instantiated" panels that don't have a 1 to 1 correspondence with their types. */
if (has_instanced_panel) {
LISTBASE_FOREACH (Panel *, panel, &region->panels) {
if (panel->type == NULL) {

View File

@@ -1283,7 +1283,7 @@ static ScrEdge *screen_area_edge_from_cursor(const bContext *C,
*
* callbacks:
*
* invoke() gets called on shift+lmb drag in action-zone
* invoke() gets called on Shift-LMB drag in action-zone
* exec() execute without any user interaction, based on properties
* call init(), add handler
*
@@ -2078,7 +2078,7 @@ typedef struct sAreaSplitData {
int bigger, smaller; /* constraints for moving new edge */
int delta; /* delta move edge */
int origmin, origsize; /* to calculate fac, for property storage */
int previewmode; /* draw previewline, then split */
int previewmode; /* draw preview-line, then split. */
void *draw_callback; /* call `screen_draw_split_preview` */
bool do_snap;
@@ -2628,8 +2628,8 @@ static int area_max_regionsize(ScrArea *area, ARegion *scalear, AZEdge edge)
dist = BLI_rcti_size_y(&area->totrct);
}
/* subtractwidth of regions on opposite side
* prevents dragging regions into other opposite regions */
/* Subtract the width of regions on opposite side
* prevents dragging regions into other opposite regions. */
LISTBASE_FOREACH (ARegion *, region, &area->regionbase) {
if (region == scalear) {
continue;
@@ -3082,12 +3082,12 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op)
float cfra = (float)(CFRA);
/* init binarytree-list for getting keyframes */
/* Initialize binary-tree-list for getting keyframes. */
struct AnimKeylist *keylist = ED_keylist_create();
/* seed up dummy dopesheet context with flags to perform necessary filtering */
/* Speed up dummy dope-sheet context with flags to perform necessary filtering. */
if ((scene->flag & SCE_KEYS_NO_SELONLY) == 0) {
/* only selected channels are included */
/* Only selected channels are included. */
ads.filterflag |= ADS_FILTER_ONLYSEL;
}
@@ -4206,7 +4206,7 @@ static void SCREEN_OT_header_toggle_menus(wmOperatorType *ot)
/** \} */
/* -------------------------------------------------------------------- */
/** \name Region Context Menu Operator (Header/Footer/Navbar)
/** \name Region Context Menu Operator (Header/Footer/Navigation-Bar)
* \{ */
static void screen_area_menu_items(ScrArea *area, uiLayout *layout)

View File

@@ -295,7 +295,7 @@ static uint vpaint_blend(const VPaint *vp,
uint color_blend = ED_vpaint_blend_tool(blend, color_curr, color_paint, alpha_i);
/* if no accumulate, clip color adding with colorig & orig alpha */
/* If no accumulate, clip color adding with `color_orig` & `color_test`. */
if (!brush_use_accumulate(vp)) {
uint color_test, a;
char *cp, *ct, *co;

View File

@@ -919,7 +919,7 @@ static void prepare_filter_asset_library(const FileList *filelist, FileListFilte
}
/**
* Copy a string from source to dest, but prefix and suffix it with a single space.
* Copy a string from source to `dest`, but prefix and suffix it with a single space.
* Assumes `dest` has at least space enough for the two spaces.
*/
static void tag_copy_with_spaces(char *dest, const char *source, const size_t dest_size)
@@ -939,9 +939,9 @@ static void tag_copy_with_spaces(char *dest, const char *source, const size_t de
*
* Here the tags on the asset are written in set notation:
*
* asset_tag_matches_filter(" some tags ", {"some", "blue"}) -> true
* asset_tag_matches_filter(" some tags ", {"som", "tag"}) -> false
* asset_tag_matches_filter(" some tags ", {}) -> false
* `asset_tag_matches_filter(" some tags ", {"some", "blue"})` -> true
* `asset_tag_matches_filter(" some tags ", {"som", "tag"})` -> false
* `asset_tag_matches_filter(" some tags ", {})` -> false
*/
static bool asset_tag_matches_filter(const char *filter_search, const AssetMetaData *asset_data)
{

View File

@@ -133,7 +133,8 @@ static int wm_xr_session_toggle_exec(bContext *C, wmOperator *UNUSED(op))
wmWindow *win = CTX_wm_window(C);
View3D *v3d = CTX_wm_view3d(C);
/* Lazy-create xr context - tries to dynlink to the runtime, reading active_runtime.json. */
/* Lazily-create XR context - tries to dynamic-link to the runtime,
* reading `active_runtime.json`. */
if (wm_xr_init(wm) == false) {
return OPERATOR_CANCELLED;
}