From cea588b9ef8f9bdb2729fb233d6f1ed0886700e1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 14 Jan 2022 10:47:50 +1100 Subject: Cleanup: spelling in comments, C++ style comments for disabled code Also ensure space at end of comment. --- source/blender/editors/space_outliner/outliner_draw.cc | 4 ++-- source/blender/editors/space_outliner/outliner_edit.cc | 12 ++++++------ source/blender/editors/space_outliner/outliner_intern.hh | 6 +++--- source/blender/editors/space_outliner/outliner_select.cc | 2 +- source/blender/editors/space_outliner/outliner_sync.cc | 2 +- source/blender/editors/space_outliner/outliner_utils.cc | 2 +- source/blender/editors/space_outliner/tree/tree_display.h | 3 ++- 7 files changed, 16 insertions(+), 15 deletions(-) (limited to 'source/blender/editors/space_outliner') diff --git a/source/blender/editors/space_outliner/outliner_draw.cc b/source/blender/editors/space_outliner/outliner_draw.cc index e7f35b856c0..07c25a57f08 100644 --- a/source/blender/editors/space_outliner/outliner_draw.cc +++ b/source/blender/editors/space_outliner/outliner_draw.cc @@ -2165,7 +2165,7 @@ static bool outliner_draw_warning_tree_element(uiBlock *block, const int te_ys) { if ((te->flag & TE_HAS_WARNING) == 0) { - /* If given element has no warning, recusively try to display the first sub-elements' warning. + /* If given element has no warning, recursively try to display the first sub-elements' warning. */ if (!TSELEM_OPEN(tselem, space_outliner)) { LISTBASE_FOREACH (TreeElement *, sub_te, &te->subtree) { @@ -3422,7 +3422,7 @@ static void outliner_draw_hierarchy_line( /* Small vertical padding. */ const short line_padding = UI_UNIT_Y / 4.0f; - /* >= is 1.0 for undashed lines. */ + /* >= is 1.0 for un-dashed lines. */ immUniform1f("dash_factor", draw_dashed ? 0.5f : 1.0f); immBegin(GPU_PRIM_LINES, 2); diff --git a/source/blender/editors/space_outliner/outliner_edit.cc b/source/blender/editors/space_outliner/outliner_edit.cc index 9a4ef1c5d2e..a10dbc94b34 100644 --- a/source/blender/editors/space_outliner/outliner_edit.cc +++ b/source/blender/editors/space_outliner/outliner_edit.cc @@ -1466,10 +1466,10 @@ static void outliner_find_panel( else { /* pop up panel - no previous, or user didn't want search after previous */ name[0] = '\0'; - /* XXX if (sbutton(name, 0, sizeof(name) - 1, "Find: ") && name[0]) { */ - /* te = outliner_find_name(space_outliner, &space_outliner->tree, name, flags, nullptr, &prevFound); */ - /* } */ - /* else return; XXX RETURN! XXX */ + // XXX if (sbutton(name, 0, sizeof(name) - 1, "Find: ") && name[0]) { + // te = outliner_find_name(space_outliner, &space_outliner->tree, name, flags, nullptr, &prevFound); + // } + // else return; XXX RETURN! XXX } /* do selection and reveal */ @@ -1485,7 +1485,7 @@ static void outliner_find_panel( outliner_flag_set(space_outliner, &space_outliner->tree, TSE_SELECTED, 0); tselem->flag |= TSE_SELECTED; - /* make te->ys center of view */ + /* Make `te->ys` center of view. */ ytop = (int)(te->ys + BLI_rctf_size_y(®ion->v2d.mask) / 2); if (ytop > 0) { ytop = 0; @@ -1493,7 +1493,7 @@ static void outliner_find_panel( region->v2d.cur.ymax = (float)ytop; region->v2d.cur.ymin = (float)(ytop - BLI_rctf_size_y(®ion->v2d.mask)); - /* make te->xs ==> te->xend center of view */ + /* Make `te->xs` ==> `te->xend` center of view. */ xdelta = (int)(te->xs - region->v2d.cur.xmin); region->v2d.cur.xmin += xdelta; region->v2d.cur.xmax += xdelta; diff --git a/source/blender/editors/space_outliner/outliner_intern.hh b/source/blender/editors/space_outliner/outliner_intern.hh index 24e86e06f68..a11f325ef05 100644 --- a/source/blender/editors/space_outliner/outliner_intern.hh +++ b/source/blender/editors/space_outliner/outliner_intern.hh @@ -594,7 +594,7 @@ TreeElement *outliner_find_item_at_x_in_row(const SpaceOutliner *space_outliner, bool *r_is_merged_icon, bool *r_is_over_icon); /** - * `tse` is not in the treestore, we use its contents to find a match. + * `tse` is not in the tree-store, we use its contents to find a match. */ TreeElement *outliner_find_tse(struct SpaceOutliner *space_outliner, const TreeStoreElem *tse); /** @@ -608,7 +608,7 @@ TreeElement *outliner_find_parent_element(ListBase *lb, TreeElement *parent_te, const TreeElement *child_te); /** - * Find treestore that refers to given ID. + * Find tree-store that refers to given ID. */ TreeElement *outliner_find_id(struct SpaceOutliner *space_outliner, ListBase *lb, @@ -633,7 +633,7 @@ bool outliner_tree_traverse(const SpaceOutliner *space_outliner, void *customdata); float outliner_restrict_columns_width(const struct SpaceOutliner *space_outliner); /** - * Find first tree element in tree with matching treestore flag. + * Find first tree element in tree with matching tree-store flag. */ TreeElement *outliner_find_element_with_flag(const ListBase *lb, short flag); /** diff --git a/source/blender/editors/space_outliner/outliner_select.cc b/source/blender/editors/space_outliner/outliner_select.cc index 887890090db..c2a7bfb9b37 100644 --- a/source/blender/editors/space_outliner/outliner_select.cc +++ b/source/blender/editors/space_outliner/outliner_select.cc @@ -355,7 +355,7 @@ static void tree_element_object_activate(bContext *C, } } else { - /* deleselect all */ + /* De-select all. */ /* Only in object mode so we can switch the active object, * keeping all objects in the current 'mode' selected, useful for multi-pose/edit mode. diff --git a/source/blender/editors/space_outliner/outliner_sync.cc b/source/blender/editors/space_outliner/outliner_sync.cc index 20806ff0a10..74416024b03 100644 --- a/source/blender/editors/space_outliner/outliner_sync.cc +++ b/source/blender/editors/space_outliner/outliner_sync.cc @@ -562,7 +562,7 @@ void outliner_sync_selection(const bContext *C, SpaceOutliner *space_outliner) outliner_sync_selection_to_outliner( view_layer, space_outliner, &space_outliner->tree, &active_data, &sync_types); - /* Keep any unsynced data in the dirty flag */ + /* Keep any un-synced data in the dirty flag. */ if (sync_types.object) { space_outliner->sync_select_dirty &= ~WM_OUTLINER_SYNC_SELECT_FROM_OBJECT; } diff --git a/source/blender/editors/space_outliner/outliner_utils.cc b/source/blender/editors/space_outliner/outliner_utils.cc index a097e86e2fa..86b56a7ec12 100644 --- a/source/blender/editors/space_outliner/outliner_utils.cc +++ b/source/blender/editors/space_outliner/outliner_utils.cc @@ -196,7 +196,7 @@ TreeElement *outliner_find_tse(SpaceOutliner *space_outliner, const TreeStoreEle return nullptr; } - /* check if 'tse' is in treestore */ + /* Check if 'tse' is in tree-store. */ tselem = BKE_outliner_treehash_lookup_any( space_outliner->runtime->treehash, tse->type, tse->nr, tse->id); if (tselem) { diff --git a/source/blender/editors/space_outliner/tree/tree_display.h b/source/blender/editors/space_outliner/tree/tree_display.h index 7b959576a4b..54a2516ca1c 100644 --- a/source/blender/editors/space_outliner/tree/tree_display.h +++ b/source/blender/editors/space_outliner/tree/tree_display.h @@ -54,7 +54,8 @@ bool outliner_tree_display_warnings_poll(const struct TreeDisplay *tree_display) * * \param r_icon The icon to display as warning. * \param r_message The message to display as warning. - * \return true if there is a warning, false otherwise. */ + * \return true if there is a warning, false otherwise. + */ bool outliner_element_warnings_get(struct TreeElement *te, int *r_icon, const char **r_message); /* The following functions are needed to build the tree. They are calls back into C; the way -- cgit v1.2.3