diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-07-02 05:58:25 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-07-02 06:03:46 +0300 |
commit | 26ffed74661e4e67d7d7f720404d3f821d824d55 (patch) | |
tree | 3227a81eab8158780ccd6c98d664060e422d434c /source/blender/blenlib | |
parent | afd976a3b483ae0e0bc9547825ff587e5297a23c (diff) |
Cleanup: spelling
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/intern/BLI_kdopbvh.c | 12 | ||||
-rw-r--r-- | source/blender/blenlib/intern/bitmap.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/string.c | 34 |
3 files changed, 23 insertions, 25 deletions
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index 9d1981b3392..40b011dca9e 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -1032,12 +1032,14 @@ bool BLI_bvhtree_update_node( return true; } -/* call BLI_bvhtree_update_node() first for every node/point/triangle */ +/** + * Call #BLI_bvhtree_update_node() first for every node/point/triangle. + */ void BLI_bvhtree_update_tree(BVHTree *tree) { /* Update bottom=>top - * TRICKY: the way we build the tree all the childs have an index greater than the parent - * This allows us todo a bottom up update by starting on the bigger numbered branch */ + * TRICKY: the way we build the tree all the children have an index greater than the parent + * This allows us todo a bottom up update by starting on the bigger numbered branch. */ BVHNode **root = tree->nodes + tree->totleaf; BVHNode **index = tree->nodes + tree->totleaf + tree->totbranch - 1; @@ -2309,7 +2311,7 @@ static bool bvhtree_walk_dfs_recursive(BVHTree_WalkData *walk_data, const BVHNod } /** - * This is a generic function to perform a depth first search on the BVHTree + * This is a generic function to perform a depth first search on the #BVHTree * where the search order and nodes traversed depend on callbacks passed in. * * \param tree: Tree to walk. @@ -2317,7 +2319,7 @@ static bool bvhtree_walk_dfs_recursive(BVHTree_WalkData *walk_data, const BVHNod * \param walk_leaf_cb: Callback to test leaf nodes, callback must store its own result, * returning false exits early. * \param walk_order_cb: Callback that indicates which direction to search, - * either from the node with the lower or higher k-dop axis value. + * either from the node with the lower or higher K-DOP axis value. * \param userdata: Argument passed to all callbacks. */ void BLI_bvhtree_walk_dfs(BVHTree *tree, diff --git a/source/blender/blenlib/intern/bitmap.c b/source/blender/blenlib/intern/bitmap.c index d24047397fb..54edcaec2c8 100644 --- a/source/blender/blenlib/intern/bitmap.c +++ b/source/blender/blenlib/intern/bitmap.c @@ -20,7 +20,7 @@ /** \file * \ingroup bli * - * Utility functions for variable size bitmasks. + * Utility functions for variable size bit-masks. */ #include <limits.h> diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c index ef137c4459e..abdae06acd5 100644 --- a/source/blender/blenlib/intern/string.c +++ b/source/blender/blenlib/intern/string.c @@ -409,7 +409,7 @@ char *BLI_str_quoted_substrN(const char *__restrict str, const char *__restrict /** * string with all instances of substr_old replaced with substr_new, - * Returns a copy of the cstring \a str into a newly mallocN'd + * Returns a copy of the c-string \a str into a newly #MEM_mallocN'd * and returns it. * * \note A rather wasteful string-replacement utility, though this shall do for now... @@ -430,53 +430,49 @@ char *BLI_str_replaceN(const char *__restrict str, BLI_assert(substr_old[0] != '\0'); - /* while we can still find a match for the old substring that we're searching for, - * keep dicing and replacing - */ + /* While we can still find a match for the old sub-string that we're searching for, + * keep dicing and replacing. */ while ((match = strstr(str, substr_old))) { /* the assembly buffer only gets created when we actually need to rebuild the string */ if (ds == NULL) { ds = BLI_dynstr_new(); } - /* if the match position does not match the current position in the string, - * copy the text up to this position and advance the current position in the string - */ + /* If the match position does not match the current position in the string, + * copy the text up to this position and advance the current position in the string. */ if (str != match) { - /* add the segment of the string from str to match to the buffer, - * then restore the value at match */ + /* Add the segment of the string from `str` to match to the buffer, + * then restore the value at match. */ BLI_dynstr_nappend(ds, str, (match - str)); /* now our current position should be set on the start of the match */ str = match; } - /* add the replacement text to the accumulation buffer */ + /* Add the replacement text to the accumulation buffer. */ BLI_dynstr_append(ds, substr_new); - /* advance the current position of the string up to the end of the replaced segment */ + /* Advance the current position of the string up to the end of the replaced segment. */ str += len_old; } - /* finish off and return a new string that has had all occurrences of */ + /* Finish off and return a new string that has had all occurrences of. */ if (ds) { char *str_new; - /* add what's left of the string to the assembly buffer - * - we've been adjusting str to point at the end of the replaced segments - */ + /* Add what's left of the string to the assembly buffer + * - we've been adjusting `str` to point at the end of the replaced segments. */ BLI_dynstr_append(ds, str); - /* convert to new c-string (MEM_malloc'd), and free the buffer */ + /* Convert to new c-string (MEM_malloc'd), and free the buffer. */ str_new = BLI_dynstr_get_cstring(ds); BLI_dynstr_free(ds); return str_new; } else { - /* just create a new copy of the entire string - we avoid going through the assembly buffer - * for what should be a bit more efficiency... - */ + /* Just create a new copy of the entire string - we avoid going through the assembly buffer + * for what should be a bit more efficiency. */ return BLI_strdup(str); } } |