Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-02-05 08:23:34 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-02-05 08:23:34 +0300
commit17e1e2bfd8dfbd6f6fc42cc305e93393342020f7 (patch)
tree8a164422f7eb7d3aa9f7473c19c80da535c29a05 /source/blender/blenlib
parentb62b923f544fa1df0aecd56f3568dd5185601306 (diff)
Cleanup: correct spelling in comments
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/BLI_fileops.h6
-rw-r--r--source/blender/blenlib/BLI_math_rotation.h2
-rw-r--r--source/blender/blenlib/BLI_mesh_intersect.hh4
-rw-r--r--source/blender/blenlib/BLI_sys_types.h2
-rw-r--r--source/blender/blenlib/BLI_system.h2
-rw-r--r--source/blender/blenlib/BLI_voronoi_2d.h2
-rw-r--r--source/blender/blenlib/BLI_winstuff.h2
-rw-r--r--source/blender/blenlib/intern/BLI_filelist.c2
-rw-r--r--source/blender/blenlib/intern/BLI_kdopbvh.c8
-rw-r--r--source/blender/blenlib/intern/array_store.c2
-rw-r--r--source/blender/blenlib/intern/boxpack_2d.c2
-rw-r--r--source/blender/blenlib/intern/delaunay_2d.cc6
-rw-r--r--source/blender/blenlib/intern/freetypefont.c2
-rw-r--r--source/blender/blenlib/intern/gsqueue.c2
-rw-r--r--source/blender/blenlib/intern/jitter_2d.c2
-rw-r--r--source/blender/blenlib/intern/kdtree_impl.h2
-rw-r--r--source/blender/blenlib/intern/math_base_inline.c4
-rw-r--r--source/blender/blenlib/intern/math_color_inline.c2
-rw-r--r--source/blender/blenlib/intern/math_geom.c8
-rw-r--r--source/blender/blenlib/intern/math_rotation.c2
-rw-r--r--source/blender/blenlib/intern/math_vec.cc2
-rw-r--r--source/blender/blenlib/intern/mesh_intersect.cc6
-rw-r--r--source/blender/blenlib/intern/path_util.c4
-rw-r--r--source/blender/blenlib/intern/polyfill_2d.c4
-rw-r--r--source/blender/blenlib/intern/scanfill.c6
-rw-r--r--source/blender/blenlib/intern/scanfill_utils.c2
-rw-r--r--source/blender/blenlib/intern/storage.c4
-rw-r--r--source/blender/blenlib/intern/string_utf8.c3
-rw-r--r--source/blender/blenlib/intern/system.c2
-rw-r--r--source/blender/blenlib/intern/threads.cc2
-rw-r--r--source/blender/blenlib/tests/BLI_delaunay_2d_test.cc6
-rw-r--r--source/blender/blenlib/tests/BLI_polyfill_2d_test.cc2
32 files changed, 53 insertions, 54 deletions
diff --git a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h
index 9f144a0ddaa..df80e720363 100644
--- a/source/blender/blenlib/BLI_fileops.h
+++ b/source/blender/blenlib/BLI_fileops.h
@@ -88,10 +88,10 @@ typedef enum eFileAttributes {
FILE_ATTR_TEMPORARY = 1 << 7, /* Used for temporary storage. */
FILE_ATTR_SPARSE_FILE = 1 << 8, /* Sparse File. */
FILE_ATTR_OFFLINE = 1 << 9, /* Data is not immediately available. */
- FILE_ATTR_ALIAS = 1 << 10, /* Mac Alias or Windows Lnk. File-based redirection. */
- FILE_ATTR_REPARSE_POINT = 1 << 11, /* File has associated reparse point. */
+ FILE_ATTR_ALIAS = 1 << 10, /* Mac Alias or Windows LNK. File-based redirection. */
+ FILE_ATTR_REPARSE_POINT = 1 << 11, /* File has associated re-parse point. */
FILE_ATTR_SYMLINK = 1 << 12, /* Reference to another file. */
- FILE_ATTR_JUNCTION_POINT = 1 << 13, /* Folder Symlink. */
+ FILE_ATTR_JUNCTION_POINT = 1 << 13, /* Folder Symbolic-link. */
FILE_ATTR_MOUNT_POINT = 1 << 14, /* Volume mounted as a folder. */
FILE_ATTR_HARDLINK = 1 << 15, /* Duplicated directory entry. */
} eFileAttributes;
diff --git a/source/blender/blenlib/BLI_math_rotation.h b/source/blender/blenlib/BLI_math_rotation.h
index f45a4d6fdef..fe995b2e46e 100644
--- a/source/blender/blenlib/BLI_math_rotation.h
+++ b/source/blender/blenlib/BLI_math_rotation.h
@@ -177,7 +177,7 @@ typedef enum eEulerRotationOrders {
EULER_ORDER_YZX,
EULER_ORDER_ZXY,
EULER_ORDER_ZYX,
- /* there are 6 more entries with dulpicate entries included */
+ /* There are 6 more entries with duplicate entries included. */
} eEulerRotationOrders;
void eulO_to_quat(float quat[4], const float eul[3], const short order);
diff --git a/source/blender/blenlib/BLI_mesh_intersect.hh b/source/blender/blenlib/BLI_mesh_intersect.hh
index ddda3edf2ff..a7996939bb1 100644
--- a/source/blender/blenlib/BLI_mesh_intersect.hh
+++ b/source/blender/blenlib/BLI_mesh_intersect.hh
@@ -95,7 +95,7 @@ struct Plane {
/* Test equality on the exact fields. */
bool operator==(const Plane &other) const;
- /* Hash onthe exact fields. */
+ /* Hash on the exact fields. */
uint64_t hash() const;
void make_canonical();
@@ -144,7 +144,7 @@ struct Face : NonCopyable {
/* Test equality of verts, in same positions. */
bool operator==(const Face &other) const;
- /* Test equaliy faces allowing cyclic shifts. */
+ /* Test equality faces allowing cyclic shifts. */
bool cyclic_equal(const Face &other) const;
FacePos next_pos(FacePos p) const
diff --git a/source/blender/blenlib/BLI_sys_types.h b/source/blender/blenlib/BLI_sys_types.h
index ff1f6af9573..2740e3740f2 100644
--- a/source/blender/blenlib/BLI_sys_types.h
+++ b/source/blender/blenlib/BLI_sys_types.h
@@ -40,7 +40,7 @@ extern "C" {
#if defined(__linux__) || defined(__GNU__) || defined(__NetBSD__) || defined(__OpenBSD__) || \
defined(__FreeBSD_kernel__) || defined(__HAIKU__)
-/* Linux-i386, Linux-Alpha, Linux-ppc */
+/* Linux-i386, Linux-Alpha, Linux-PPC */
# include <stdint.h>
/* XXX */
diff --git a/source/blender/blenlib/BLI_system.h b/source/blender/blenlib/BLI_system.h
index 8dd0706e1e2..0d5b2e6e2df 100644
--- a/source/blender/blenlib/BLI_system.h
+++ b/source/blender/blenlib/BLI_system.h
@@ -49,7 +49,7 @@ void BLI_hostname_get(char *buffer, size_t bufsize);
size_t BLI_system_memory_max_in_megabytes(void);
int BLI_system_memory_max_in_megabytes_int(void);
-/* getpid */
+/* For `getpid`. */
#ifdef WIN32
# define BLI_SYSTEM_PID_H <process.h>
diff --git a/source/blender/blenlib/BLI_voronoi_2d.h b/source/blender/blenlib/BLI_voronoi_2d.h
index 92c7d367b48..0e27229352f 100644
--- a/source/blender/blenlib/BLI_voronoi_2d.h
+++ b/source/blender/blenlib/BLI_voronoi_2d.h
@@ -50,7 +50,7 @@ typedef struct VoronoiEdge {
/* point on Voronoi place on the right side of edge */
float right[2];
- /* directional coeffitients satisfying equation y = f * x + g (edge lies on this line) */
+ /* Directional coefficients satisfying equation `y = f * x + g` (edge lies on this line). */
float f, g;
/* some edges consist of two parts,
diff --git a/source/blender/blenlib/BLI_winstuff.h b/source/blender/blenlib/BLI_winstuff.h
index dc4d6d8fce4..f771d26baab 100644
--- a/source/blender/blenlib/BLI_winstuff.h
+++ b/source/blender/blenlib/BLI_winstuff.h
@@ -64,7 +64,7 @@ extern "C" {
# define S_ISDIR(x) (((x)&_S_IFDIR) == _S_IFDIR)
#endif
-/* defines for using ISO C++ conformant names */
+/* Defines for using ISO C++ conferment names. */
#if !defined(_MSC_VER) || _MSC_VER < 1900
# define snprintf _snprintf
#endif
diff --git a/source/blender/blenlib/intern/BLI_filelist.c b/source/blender/blenlib/intern/BLI_filelist.c
index fe3ec368379..cc01693422c 100644
--- a/source/blender/blenlib/intern/BLI_filelist.c
+++ b/source/blender/blenlib/intern/BLI_filelist.c
@@ -369,7 +369,7 @@ void BLI_filelist_entry_datetime_to_string(const struct stat *st,
int yesterday_yday = 0;
if (r_is_today || r_is_yesterday) {
- /* Localtime() has only one buffer so need to get data out before called again. */
+ /* `localtime()` has only one buffer so need to get data out before called again. */
const time_t ts_now = time(NULL);
struct tm *today = localtime(&ts_now);
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c
index 0f90ad3a490..e1e71b02615 100644
--- a/source/blender/blenlib/intern/BLI_kdopbvh.c
+++ b/source/blender/blenlib/intern/BLI_kdopbvh.c
@@ -94,7 +94,7 @@ struct BVHTree {
BVHNode *nodearray; /* pre-alloc branch nodes */
BVHNode **nodechild; /* pre-alloc children for nodes */
float *nodebv; /* pre-alloc bounding-volumes for nodes */
- float epsilon; /* epslion is used for inflation of the k-dop */
+ float epsilon; /* Epsilon is used for inflation of the K-DOP. */
int totleaf; /* leafs */
int totbranch;
axis_t start_axis, stop_axis; /* bvhtree_kdop_axes array indices according to axis */
@@ -365,7 +365,7 @@ static void create_kdop_hull(
int k;
axis_t axis_iter;
- /* don't init boudings for the moving case */
+ /* Don't initialize bounds for the moving case */
if (!moving) {
node_minmax_init(tree, node);
}
@@ -573,9 +573,9 @@ typedef struct BVHBuildHelper {
int tree_type;
int totleafs;
- /** Min number of leafs that are archievable from a node at depth N */
+ /** Min number of leafs that are achievable from a node at depth `N`. */
int leafs_per_child[32];
- /** Number of nodes at depth N (tree_type^N) */
+ /** Number of nodes at depth `N (tree_type^N)`. */
int branches_on_level[32];
/** Number of leafs that are placed on the level that is not 100% filled */
diff --git a/source/blender/blenlib/intern/array_store.c b/source/blender/blenlib/intern/array_store.c
index 847cb42186a..08164e75009 100644
--- a/source/blender/blenlib/intern/array_store.c
+++ b/source/blender/blenlib/intern/array_store.c
@@ -533,7 +533,7 @@ static void bchunk_list_calc_trim_len(const BArrayInfo *info,
data_trim_len = data_trim_len - data_last_chunk_len;
if (data_last_chunk_len) {
if (data_last_chunk_len < info->chunk_byte_size_min) {
- /* may be zero and thats OK */
+ /* May be zero and that's OK. */
data_trim_len -= info->chunk_byte_size;
data_last_chunk_len += info->chunk_byte_size;
}
diff --git a/source/blender/blenlib/intern/boxpack_2d.c b/source/blender/blenlib/intern/boxpack_2d.c
index 3d010011a79..84b3f728884 100644
--- a/source/blender/blenlib/intern/boxpack_2d.c
+++ b/source/blender/blenlib/intern/boxpack_2d.c
@@ -385,7 +385,7 @@ void BLI_box_pack_2d(BoxPack *boxarray, const uint len, float *r_tot_x, float *r
box++; /* next box, needed for the loop below */
/* ...done packing the first box */
- /* Main boxpacking loop */
+ /* Main box-packing loop */
for (box_index = 1; box_index < len; box_index++, box++) {
/* These floats are used for sorting re-sorting */
diff --git a/source/blender/blenlib/intern/delaunay_2d.cc b/source/blender/blenlib/intern/delaunay_2d.cc
index f0b65a55816..c9315dab456 100644
--- a/source/blender/blenlib/intern/delaunay_2d.cc
+++ b/source/blender/blenlib/intern/delaunay_2d.cc
@@ -754,7 +754,7 @@ template<> CDTVert<double>::CDTVert(const vec2<double> &pt)
{
this->co.exact = pt;
this->co.approx = pt;
- this->co.abs_approx = pt; /* Not used, so does't matter. */
+ this->co.abs_approx = pt; /* Not used, so doesn't matter. */
this->input_ids = nullptr;
this->symedge = nullptr;
this->index = -1;
@@ -1411,12 +1411,12 @@ void dc_tri(CDTArrangement<T> *cdt,
/* Guibas-Stolfi Divide-and_Conquer algorithm. */
template<typename T> void dc_triangulate(CDTArrangement<T> *cdt, Array<SiteInfo<T>> &sites)
{
- /* Compress sites in place to eliminted verts that merge to others. */
+ /* Compress sites in place to eliminated verts that merge to others. */
int i = 0;
int j = 0;
int nsites = sites.size();
while (j < nsites) {
- /* Invariante: sites[0..i-1] have non-merged verts from 0..(j-1) in them. */
+ /* Invariant: `sites[0..i-1]` have non-merged verts from `0..(j-1)` in them. */
sites[i] = sites[j++];
if (sites[i].v->merge_to_index < 0) {
i++;
diff --git a/source/blender/blenlib/intern/freetypefont.c b/source/blender/blenlib/intern/freetypefont.c
index 301d9dc2296..e755a8e75b5 100644
--- a/source/blender/blenlib/intern/freetypefont.c
+++ b/source/blender/blenlib/intern/freetypefont.c
@@ -307,7 +307,7 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile *pf)
/* Extract the first 256 character from TTF */
lcode = charcode = FT_Get_First_Char(face, &glyph_index);
- /* No charmap found from the ttf so we need to figure it out */
+ /* No `charmap` found from the TTF so we need to figure it out. */
if (glyph_index == 0) {
FT_CharMap found = NULL;
FT_CharMap charmap;
diff --git a/source/blender/blenlib/intern/gsqueue.c b/source/blender/blenlib/intern/gsqueue.c
index 118d19418d4..ae34074e804 100644
--- a/source/blender/blenlib/intern/gsqueue.c
+++ b/source/blender/blenlib/intern/gsqueue.c
@@ -41,7 +41,7 @@ struct QueueChunk {
struct _GSQueue {
struct QueueChunk *chunk_first; /* first active chunk to pop from */
- struct QueueChunk *chunk_last; /* flast active chunk to push onto */
+ struct QueueChunk *chunk_last; /* last active chunk to push onto */
struct QueueChunk *chunk_free; /* free chunks to reuse */
size_t chunk_first_index; /* index into 'chunk_first' */
size_t chunk_last_index; /* index into 'chunk_last' */
diff --git a/source/blender/blenlib/intern/jitter_2d.c b/source/blender/blenlib/intern/jitter_2d.c
index c92aeddb27d..068cb3d2f70 100644
--- a/source/blender/blenlib/intern/jitter_2d.c
+++ b/source/blender/blenlib/intern/jitter_2d.c
@@ -179,7 +179,7 @@ void BLI_jitter_init(float (*jitarr)[2], int num)
MEM_freeN(jit2);
- /* finally, move jittertab to be centered around (0, 0) */
+ /* Finally, move jitter to be centered around (0, 0). */
for (i = 0; i < num; i++) {
jitarr[i][0] -= 0.5f;
jitarr[i][1] -= 0.5f;
diff --git a/source/blender/blenlib/intern/kdtree_impl.h b/source/blender/blenlib/intern/kdtree_impl.h
index 26b2228cdbc..c92dc2e95a3 100644
--- a/source/blender/blenlib/intern/kdtree_impl.h
+++ b/source/blender/blenlib/intern/kdtree_impl.h
@@ -158,7 +158,7 @@ static uint kdtree_balance(KDTreeNode *nodes, uint nodes_len, uint axis, const u
return 0 + ofs;
}
- /* quicksort style sorting around median */
+ /* Quick-sort style sorting around median. */
left = 0;
right = nodes_len - 1;
median = nodes_len / 2;
diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c
index b332a0b2cb9..28aa81e5858 100644
--- a/source/blender/blenlib/intern/math_base_inline.c
+++ b/source/blender/blenlib/intern/math_base_inline.c
@@ -379,7 +379,7 @@ MINLINE float fractf(float a)
return a - floorf(a);
}
-/* Adapted from godotengine math_funcs.h. */
+/* Adapted from godot-engine math_funcs.h. */
MINLINE float wrapf(float value, float max, float min)
{
float range = max - min;
@@ -716,7 +716,7 @@ MALWAYS_INLINE __m128 _bli_math_improve_5throot_solution(const __m128 old_result
__m128 approx2 = _mm_mul_ps(old_result, old_result);
__m128 approx4 = _mm_mul_ps(approx2, approx2);
__m128 t = _mm_div_ps(x, approx4);
- __m128 summ = _mm_add_ps(_mm_mul_ps(_mm_set1_ps(4.0f), old_result), t); /* fma */
+ __m128 summ = _mm_add_ps(_mm_mul_ps(_mm_set1_ps(4.0f), old_result), t); /* FMA. */
return _mm_mul_ps(summ, _mm_set1_ps(1.0f / 5.0f));
}
diff --git a/source/blender/blenlib/intern/math_color_inline.c b/source/blender/blenlib/intern/math_color_inline.c
index a1caf2fe02d..26828cb8717 100644
--- a/source/blender/blenlib/intern/math_color_inline.c
+++ b/source/blender/blenlib/intern/math_color_inline.c
@@ -41,7 +41,7 @@ MALWAYS_INLINE __m128 srgb_to_linearrgb_v4_simd(const __m128 c)
__m128 cmp = _mm_cmplt_ps(c, _mm_set1_ps(0.04045f));
__m128 lt = _mm_max_ps(_mm_mul_ps(c, _mm_set1_ps(1.0f / 12.92f)), _mm_set1_ps(0.0f));
__m128 gtebase = _mm_mul_ps(_mm_add_ps(c, _mm_set1_ps(0.055f)),
- _mm_set1_ps(1.0f / 1.055f)); /* fma */
+ _mm_set1_ps(1.0f / 1.055f)); /* FMA. */
__m128 gte = _bli_math_fastpow24(gtebase);
return _bli_math_blend_sse(cmp, lt, gte);
}
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index 0873dece864..5d78bb0b901 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -5233,7 +5233,7 @@ void map_to_sphere(float *r_u, float *r_v, const float x, const float y, const f
len = sqrtf(x * x + y * y + z * z);
if (len > 0.0f) {
if (UNLIKELY(x == 0.0f && y == 0.0f)) {
- *r_u = 0.0f; /* othwise domain error */
+ *r_u = 0.0f; /* Otherwise domain error. */
}
else {
*r_u = (1.0f - atan2f(x, y) / (float)M_PI) / 2.0f;
@@ -5836,7 +5836,7 @@ bool form_factor_visible_quad(const float p[3],
return true;
}
-/* altivec optimization, this works, but is unused */
+/* `AltiVec` optimization, this works, but is unused. */
#if 0
# include <Accelerate/Accelerate.h>
@@ -6125,7 +6125,7 @@ bool is_quad_convex_v3(const float v1[3], const float v2[3], const float v3[3],
bool is_quad_convex_v2(const float v1[2], const float v2[2], const float v3[2], const float v4[2])
{
- /* linetests, the 2 diagonals have to instersect to be convex */
+ /* Line-tests, the 2 diagonals have to intersect to be convex. */
return (isect_seg_seg_v2(v1, v3, v2, v4) > 0);
}
@@ -6233,7 +6233,7 @@ float cubic_tangent_factor_circle_v3(const float tan_l[3], const float tan_r[3])
return (1.0f / 3.0f) * 0.75f;
}
if (tan_dot < -1.0f + eps) {
- /* parallele tangents (half-circle) */
+ /* Parallel tangents (half-circle). */
return (1.0f / 2.0f);
}
diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c
index f0d8bea52b9..57fe99ce019 100644
--- a/source/blender/blenlib/intern/math_rotation.c
+++ b/source/blender/blenlib/intern/math_rotation.c
@@ -594,7 +594,7 @@ float quat_split_swing_and_twist(const float q_in[4], int axis, float r_swing[4]
BLI_assert(fabsf(r_swing[axis + 1]) < BLI_ASSERT_UNIT_EPSILON);
}
- /* Output twist last just in case q ovelaps r_twist. */
+ /* Output twist last just in case q overlaps r_twist. */
if (r_twist) {
r_twist[0] = cos_t;
zero_v3(r_twist + 1);
diff --git a/source/blender/blenlib/intern/math_vec.cc b/source/blender/blenlib/intern/math_vec.cc
index 84fa6c69d17..1d138d0b0f4 100644
--- a/source/blender/blenlib/intern/math_vec.cc
+++ b/source/blender/blenlib/intern/math_vec.cc
@@ -104,7 +104,7 @@ mpq2::isect_result mpq2::isect_seg_seg(const mpq2 &v1,
}
else {
ans.lambda = ((v1[1] - v3[1]) * (v4[0] - v3[0]) - (v1[0] - v3[0]) * (v4[1] - v3[1])) / div;
- /* Avoid dividing mu by div: it is expensive in multiprecision. */
+ /* Avoid dividing mu by div: it is expensive in multi-precision. */
mpq_class mudiv = ((v1[1] - v3[1]) * (v2[0] - v1[0]) - (v1[0] - v3[0]) * (v2[1] - v1[1]));
if (ans.lambda >= 0 && ans.lambda <= 1 &&
((div > 0 && mudiv >= 0 && mudiv <= div) || (div < 0 && mudiv <= 0 && mudiv >= div))) {
diff --git a/source/blender/blenlib/intern/mesh_intersect.cc b/source/blender/blenlib/intern/mesh_intersect.cc
index 85a6ab42013..04f86734b8a 100644
--- a/source/blender/blenlib/intern/mesh_intersect.cc
+++ b/source/blender/blenlib/intern/mesh_intersect.cc
@@ -1385,7 +1385,7 @@ static ITT_value itt_canon2(const mpq3 &p1,
return ITT_value(ISEGMENT, intersect_1, intersect_2);
}
-/* Helper function for intersect_tri_tri. Args have been canonicalized for triangle 1. */
+/* Helper function for intersect_tri_tri. Arguments have been canonicalized for triangle 1. */
static ITT_value itt_canon1(const mpq3 &p1,
const mpq3 &q1,
@@ -2026,7 +2026,7 @@ class TriOverlaps {
if (dbg_level > 0) {
std::cout << "TriOverlaps construction\n";
}
- /* Tree type is 8 => octtree; axis = 6 => using XYZ axes only. */
+ /* Tree type is 8 => octree; axis = 6 => using XYZ axes only. */
tree_ = BLI_bvhtree_new(tm.face_size(), FLT_EPSILON, 8, 6);
/* In the common case of a binary boolean and no self intersection in
* each shape, we will use two trees and simple bounding box overlap. */
@@ -2378,7 +2378,7 @@ static CDT_data calc_cluster_subdivided(const CoplanarClusterInfo &clinfo,
}
}
}
- /* Use CDT to subdivide the cluster triangles and the points and segs in itts. */
+ /* Use CDT to subdivide the cluster triangles and the points and segments in itts. */
CDT_data cd_data = prepare_cdt_input_for_cluster(tm, clinfo, c, itts);
do_cdt(cd_data);
return cd_data;
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index 7cd7991b8d8..39f5abc4cd8 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -459,7 +459,7 @@ static wchar_t *next_slash(wchar_t *path)
return slash;
}
-/* adds a slash if the unc path points sto a share */
+/* Adds a slash if the UNC path points to a share. */
static void BLI_path_add_slash_to_share(wchar_t *uncpath)
{
wchar_t *slash_after_server = next_slash(uncpath + 2);
@@ -1279,7 +1279,7 @@ void BLI_setenv(const char *env, const char *val)
uputenv(env, val);
#else
- /* linux/osx/bsd */
+ /* Linux/macOS/BSD */
if (val) {
setenv(env, val, 1);
}
diff --git a/source/blender/blenlib/intern/polyfill_2d.c b/source/blender/blenlib/intern/polyfill_2d.c
index fe9fa514e08..dadef979b09 100644
--- a/source/blender/blenlib/intern/polyfill_2d.c
+++ b/source/blender/blenlib/intern/polyfill_2d.c
@@ -253,7 +253,7 @@ static uint kdtree2d_balance_recursive(
return 0 + ofs;
}
- /* quicksort style sorting around median */
+ /* Quick-sort style sorting around median. */
neg = 0;
pos = totnode - 1;
median = totnode / 2;
@@ -284,7 +284,7 @@ static uint kdtree2d_balance_recursive(
}
}
- /* set node and sort subnodes */
+ /* Set node and sort sub-nodes. */
node = &nodes[median];
node->axis = axis;
axis = !axis;
diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c
index 2a520516418..8c9a229860e 100644
--- a/source/blender/blenlib/intern/scanfill.c
+++ b/source/blender/blenlib/intern/scanfill.c
@@ -526,10 +526,10 @@ static unsigned int scanfill(ScanFillContext *sf_ctx, PolyFill *pf, const int fl
if (eve->poly_nr == nr) {
if (eve->f != SF_VERT_ZERO_LEN) {
verts++;
- eve->f = SF_VERT_NEW; /* flag for connectedges later on */
+ eve->f = SF_VERT_NEW; /* Flag for connect edges later on. */
sc->vert = eve;
sc->edge_first = sc->edge_last = NULL;
- /* Note, debug print only will work for curve polyfill, union is in use for mesh */
+ /* Note, debug print only will work for curve poly-fill, union is in use for mesh. */
/* if (even->tmp.v == NULL) eve->tmp.u = verts; */
sc++;
}
@@ -609,7 +609,7 @@ static unsigned int scanfill(ScanFillContext *sf_ctx, PolyFill *pf, const int fl
sc = scdata;
for (a = 0; a < verts; a++) {
/* printf("VERTEX %d index %d\n", a, sc->vert->tmp.u); */
- /* set connectflags */
+ /* Set connect-flags. */
for (ed1 = sc->edge_first; ed1; ed1 = eed_next) {
eed_next = ed1->next;
if (ed1->v1->edge_tot == 1 || ed1->v2->edge_tot == 1) {
diff --git a/source/blender/blenlib/intern/scanfill_utils.c b/source/blender/blenlib/intern/scanfill_utils.c
index b49239547c2..ec0f8659395 100644
--- a/source/blender/blenlib/intern/scanfill_utils.c
+++ b/source/blender/blenlib/intern/scanfill_utils.c
@@ -244,7 +244,7 @@ static bool scanfill_preprocess_self_isect(ScanFillContext *sf_ctx,
continue;
}
- /* maintain coorect terminating edge */
+ /* Maintain correct terminating edge. */
if (pi->edge_last == eed) {
pi->edge_last = NULL;
}
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c
index d1e133318ba..bb00755e901 100644
--- a/source/blender/blenlib/intern/storage.c
+++ b/source/blender/blenlib/intern/storage.c
@@ -30,7 +30,7 @@
#include <sys/stat.h>
#if defined(__NetBSD__) || defined(__DragonFly__) || defined(__HAIKU__)
-/* Other modern unix os's should probably use this also */
+/* Other modern unix OS's should probably use this also. */
# include <sys/statvfs.h>
# define USE_STATFS_STATVFS
#endif
@@ -113,7 +113,7 @@ double BLI_dir_free_space(const char *dir)
char tmp[4];
tmp[0] = '\\';
- tmp[1] = 0; /* Just a failsafe */
+ tmp[1] = 0; /* Just a fail-safe. */
if (ELEM(dir[0] == '/', '\\')) {
tmp[0] = '\\';
tmp[1] = 0;
diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.c
index a637a5f24e6..7aa5930b4ad 100644
--- a/source/blender/blenlib/intern/string_utf8.c
+++ b/source/blender/blenlib/intern/string_utf8.c
@@ -225,8 +225,7 @@ int BLI_utf8_invalid_strip(char *str, size_t length)
return tot;
}
-/* compatible with BLI_strncpy, but esnure no partial utf8 chars */
-
+/** Compatible with #BLI_strncpy, but ensure no partial UTF8 chars. */
#define BLI_STR_UTF8_CPY(dst, src, maxncpy) \
{ \
size_t utf8_size; \
diff --git a/source/blender/blenlib/intern/system.c b/source/blender/blenlib/intern/system.c
index 8e3d489fbb3..e32f310549c 100644
--- a/source/blender/blenlib/intern/system.c
+++ b/source/blender/blenlib/intern/system.c
@@ -71,7 +71,7 @@ int BLI_cpu_support_sse2(void)
#endif
}
-/* Windows stackwalk lives in system_win32.c */
+/* Windows stack-walk lives in system_win32.c */
#if !defined(_MSC_VER)
/**
* Write a backtrace into a file for systems which support it.
diff --git a/source/blender/blenlib/intern/threads.cc b/source/blender/blenlib/intern/threads.cc
index b42c50803e0..35097013439 100644
--- a/source/blender/blenlib/intern/threads.cc
+++ b/source/blender/blenlib/intern/threads.cc
@@ -468,7 +468,7 @@ void BLI_spin_lock(SpinLock *spin)
#elif defined(_MSC_VER)
while (InterlockedExchangeAcquire(spin, 1)) {
while (*spin) {
- /* Spin-lock hint for processors with hyperthreading. */
+ /* Spin-lock hint for processors with hyper-threading. */
YieldProcessor();
}
}
diff --git a/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc b/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc
index 487afc095f9..d00e8bf55fd 100644
--- a/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc
+++ b/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc
@@ -1661,10 +1661,10 @@ void rand_delaunay_test(int test_kind,
}
}
for (int i = 0; i < size; ++i) {
- /* Horizontal edges: connect p(i,0) to p(i,size-1). */
+ /* Horizontal edges: connect `p(i,0)` to `p(i,size-1)`. */
in.edge[i].first = i * size;
in.edge[i].second = i * size + size - 1;
- /* Vertical edges: conntect p(0,i) to p(size-1,i). */
+ /* Vertical edges: connect `p(0,i)` to `p(size-1,i)`. */
in.edge[size + i].first = i;
in.edge[size + i].second = (size - 1) * size + i;
}
@@ -1695,7 +1695,7 @@ void rand_delaunay_test(int test_kind,
in.vert[ib][1] = T(sin(angle2));
in.vert[ic][0] = T((param * cos(angle3)));
in.vert[ic][1] = T((param * sin(angle3)));
- /* Put the coordinates in ccw order. */
+ /* Put the coordinates in CCW order. */
in.face[i].append(ia);
int orient = orient2d(in.vert[ia], in.vert[ib], in.vert[ic]);
if (orient >= 0) {
diff --git a/source/blender/blenlib/tests/BLI_polyfill_2d_test.cc b/source/blender/blenlib/tests/BLI_polyfill_2d_test.cc
index 3c9d12c7178..6ef94bd62e3 100644
--- a/source/blender/blenlib/tests/BLI_polyfill_2d_test.cc
+++ b/source/blender/blenlib/tests/BLI_polyfill_2d_test.cc
@@ -291,7 +291,7 @@ static void test_polyfill_template_main(const char *id,
(void)0
/* -------------------------------------------------------------------- */
-/* visualisation functions (not needed for testing) */
+/* visualization functions (not needed for testing) */
#ifdef USE_OBJ_PREVIEW
static void polyfill_to_obj(const char *id,