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:
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/BLI_color.hh2
-rw-r--r--source/blender/blenlib/BLI_dlrbTree.h2
-rw-r--r--source/blender/blenlib/BLI_fnmatch.h26
-rw-r--r--source/blender/blenlib/BLI_hash_md5.h4
-rw-r--r--source/blender/blenlib/BLI_math_vector.h7
-rw-r--r--source/blender/blenlib/BLI_smallhash.h4
-rw-r--r--source/blender/blenlib/BLI_task.h2
-rw-r--r--source/blender/blenlib/BLI_utildefines.h2
-rw-r--r--source/blender/blenlib/BLI_vector.hh2
-rw-r--r--source/blender/blenlib/intern/BLI_filelist.c2
-rw-r--r--source/blender/blenlib/intern/DLRB_tree.c4
-rw-r--r--source/blender/blenlib/intern/boxpack_2d.c6
-rw-r--r--source/blender/blenlib/intern/expr_pylike_eval.c20
-rw-r--r--source/blender/blenlib/intern/fnmatch.c2
-rw-r--r--source/blender/blenlib/intern/hash_md5.c30
-rw-r--r--source/blender/blenlib/intern/math_base_inline.c4
-rw-r--r--source/blender/blenlib/intern/math_geom.c2
-rw-r--r--source/blender/blenlib/intern/math_rotation.c2
-rw-r--r--source/blender/blenlib/intern/mesh_intersect.cc2
-rw-r--r--source/blender/blenlib/intern/storage.c2
-rw-r--r--source/blender/blenlib/intern/string_utf8.c4
-rw-r--r--source/blender/blenlib/intern/string_utils.c2
-rw-r--r--source/blender/blenlib/intern/system_win32.c2
-rw-r--r--source/blender/blenlib/tests/BLI_mesh_intersect_test.cc2
24 files changed, 69 insertions, 68 deletions
diff --git a/source/blender/blenlib/BLI_color.hh b/source/blender/blenlib/BLI_color.hh
index 3b01bbfb86e..76dfcf0b57d 100644
--- a/source/blender/blenlib/BLI_color.hh
+++ b/source/blender/blenlib/BLI_color.hh
@@ -180,7 +180,7 @@ class ColorSceneLinear4f final : public ColorRGBA<float, eSpace::SceneLinear, Al
/**
* Convert to its byte encoded counter space.
- **/
+ */
ColorSceneLinearByteEncoded4b<Alpha> encode() const
{
ColorSceneLinearByteEncoded4b<Alpha> encoded;
diff --git a/source/blender/blenlib/BLI_dlrbTree.h b/source/blender/blenlib/BLI_dlrbTree.h
index fc52904d699..8c20e3d3988 100644
--- a/source/blender/blenlib/BLI_dlrbTree.h
+++ b/source/blender/blenlib/BLI_dlrbTree.h
@@ -35,7 +35,7 @@ extern "C" {
*/
/* ********************************************** */
-/* Data Types and Type Defines */
+/* Data Types and Type Defines */
/* Base Structs --------------------------------- */
diff --git a/source/blender/blenlib/BLI_fnmatch.h b/source/blender/blenlib/BLI_fnmatch.h
index 2d0c13bc423..1df5b6f814a 100644
--- a/source/blender/blenlib/BLI_fnmatch.h
+++ b/source/blender/blenlib/BLI_fnmatch.h
@@ -34,36 +34,36 @@ extern "C" {
# if defined(__cplusplus) || (defined(__STDC__) && __STDC__)
# undef __P
# define __P(protos) protos
-# else /* Not C++ or ANSI C. */
+# else /* Not C++ or ANSI C. */
# undef __P
# define __P(protos) ()
/* We can get away without defining `const' here only because in this file
* it is used only inside the prototype for `fnmatch', which is elided in
- * non-ANSI C where `const' is problematical. */
-# endif /* C++ or ANSI C. */
+ * non-ANSI C where `const' is problematical. */
+# endif /* C++ or ANSI C. */
/* We #undef these before defining them because some losing systems
- * (HP-UX A.08.07 for example) define these in <unistd.h>. */
+ * (HP-UX A.08.07 for example) define these in <unistd.h>. */
# undef FNM_PATHNAME
# undef FNM_NOESCAPE
# undef FNM_PERIOD
-/* Bits set in the FLAGS argument to `fnmatch'. */
-# define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
-# define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
-# define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
+/* Bits set in the FLAGS argument to `fnmatch'. */
+# define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
+# define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
+# define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
# if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined(_GNU_SOURCE)
-# define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */
-# define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
-# define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
+# define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */
+# define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
+# define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
# endif
-/* Value returned by `fnmatch' if STRING does not match PATTERN. */
+/* Value returned by `fnmatch' if STRING does not match PATTERN. */
# define FNM_NOMATCH 1
/* Match STRING against the filename pattern PATTERN,
- * returning zero if it matches, FNM_NOMATCH if not. */
+ * returning zero if it matches, FNM_NOMATCH if not. */
extern int fnmatch __P((const char *__pattern, const char *__string, int __flags));
#else
diff --git a/source/blender/blenlib/BLI_hash_md5.h b/source/blender/blenlib/BLI_hash_md5.h
index 4a5cd8b19f3..227cfcc8876 100644
--- a/source/blender/blenlib/BLI_hash_md5.h
+++ b/source/blender/blenlib/BLI_hash_md5.h
@@ -27,13 +27,13 @@ extern "C" {
/* Compute MD5 message digest for LEN bytes beginning at BUFFER. The
* result is always in little endian byte order, so that a byte-wise
* output yields to the wanted ASCII representation of the message
- * digest. */
+ * digest. */
void *BLI_hash_md5_buffer(const char *buffer, size_t len, void *resblock);
/* Compute MD5 message digest for bytes read from STREAM. The
* resulting message digest number will be written into the 16 bytes
- * beginning at RESBLOCK. */
+ * beginning at RESBLOCK. */
int BLI_hash_md5_stream(FILE *stream, void *resblock);
diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h
index 556a216bb89..2f4cf1721af 100644
--- a/source/blender/blenlib/BLI_math_vector.h
+++ b/source/blender/blenlib/BLI_math_vector.h
@@ -382,10 +382,11 @@ MINLINE float line_point_side_v2(const float l1[2],
const float pt[2]) ATTR_WARN_UNUSED_RESULT;
/********************************** Angles ***********************************/
-/* - angle with 2 arguments is angle between vector */
-/* - angle with 3 arguments is angle between 3 points at the middle point */
-/* - angle_normalized_* is faster equivalent if vectors are normalized */
+/* - angle with 2 arguments is angle between vector.
+ * - angle with 3 arguments is angle between 3 points at the middle point.
+ * - angle_normalized_* is faster equivalent if vectors are normalized.
+ */
float angle_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT;
float angle_signed_v2v2(const float v1[2], const float v2[2]) ATTR_WARN_UNUSED_RESULT;
float angle_v2v2v2(const float a[2], const float b[2], const float c[2]) ATTR_WARN_UNUSED_RESULT;
diff --git a/source/blender/blenlib/BLI_smallhash.h b/source/blender/blenlib/BLI_smallhash.h
index daea2fcd914..f7aec716e9e 100644
--- a/source/blender/blenlib/BLI_smallhash.h
+++ b/source/blender/blenlib/BLI_smallhash.h
@@ -34,8 +34,8 @@ typedef struct {
void *val;
} SmallHashEntry;
-/* how much stack space to use before dynamically allocating memory.
- * set to match one of the values in 'hashsizes' to avoid too many mallocs */
+/* How much stack space to use before dynamically allocating memory.
+ * set to match one of the values in 'hashsizes' to avoid too many mallocs. */
#define SMSTACKSIZE 131
typedef struct SmallHash {
unsigned int nbuckets;
diff --git a/source/blender/blenlib/BLI_task.h b/source/blender/blenlib/BLI_task.h
index d6b068c3889..dbe8ec3dcc0 100644
--- a/source/blender/blenlib/BLI_task.h
+++ b/source/blender/blenlib/BLI_task.h
@@ -147,7 +147,7 @@ typedef struct TaskParallelSettings {
* (similar to OpenMP's firstprivate).
*/
void *userdata_chunk; /* Pointer to actual data. */
- size_t userdata_chunk_size; /* Size of that data. */
+ size_t userdata_chunk_size; /* Size of that data. */
/* Function called from calling thread once whole range have been
* processed.
*/
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h
index 0bf117df43b..0ddabcaa2fb 100644
--- a/source/blender/blenlib/BLI_utildefines.h
+++ b/source/blender/blenlib/BLI_utildefines.h
@@ -517,7 +517,7 @@ extern "C" {
# define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(*(arr)))
#endif
-/* ARRAY_SET_ITEMS#(v, ...): set indices of array 'v' */
+/* ARRAY_SET_ITEMS#(v, ...): set indices of array 'v' */
/* internal helpers */
#define _VA_ARRAY_SET_ITEMS2(v, a) ((v)[0] = (a))
#define _VA_ARRAY_SET_ITEMS3(v, a, b) \
diff --git a/source/blender/blenlib/BLI_vector.hh b/source/blender/blenlib/BLI_vector.hh
index f6f546c90b9..0e878d549c1 100644
--- a/source/blender/blenlib/BLI_vector.hh
+++ b/source/blender/blenlib/BLI_vector.hh
@@ -963,7 +963,7 @@ class Vector {
}
/* At least double the size of the previous allocation. Otherwise consecutive calls to grow can
- * cause a reallocation every time even though min_capacity only increments. */
+ * cause a reallocation every time even though min_capacity only increments. */
const int64_t min_new_capacity = this->capacity() * 2;
const int64_t new_capacity = std::max(min_capacity, min_new_capacity);
diff --git a/source/blender/blenlib/intern/BLI_filelist.c b/source/blender/blenlib/intern/BLI_filelist.c
index cc01693422c..55fd28667fc 100644
--- a/source/blender/blenlib/intern/BLI_filelist.c
+++ b/source/blender/blenlib/intern/BLI_filelist.c
@@ -26,7 +26,7 @@
# include <dirent.h>
#endif
-#include <string.h> /* strcpy etc.. */
+#include <string.h> /* #strcpy etc. */
#include <sys/stat.h>
#include <time.h>
diff --git a/source/blender/blenlib/intern/DLRB_tree.c b/source/blender/blenlib/intern/DLRB_tree.c
index b0c3379ac97..09234dcfa26 100644
--- a/source/blender/blenlib/intern/DLRB_tree.c
+++ b/source/blender/blenlib/intern/DLRB_tree.c
@@ -414,7 +414,7 @@ static void rotate_right(DLRBT_Tree *tree, DLRBT_Node *root)
}
/* *********************************************** */
-/* Post-Insertion Balancing */
+/* Post-Insertion Balancing */
/* forward defines for insertion checks */
static void insert_check_1(DLRBT_Tree *tree, DLRBT_Node *node);
@@ -472,7 +472,7 @@ static void insert_check_2(DLRBT_Tree *tree, DLRBT_Node *node)
}
}
-/* W. 4+5) Perform rotation on sub-tree containing the 'new' node, then do any */
+/* W. 4+5) Perform rotation on sub-tree containing the 'new' node, then do any. */
static void insert_check_3(DLRBT_Tree *tree, DLRBT_Node *node)
{
DLRBT_Node *gp = get_grandparent(node);
diff --git a/source/blender/blenlib/intern/boxpack_2d.c b/source/blender/blenlib/intern/boxpack_2d.c
index 84b3f728884..58889827b96 100644
--- a/source/blender/blenlib/intern/boxpack_2d.c
+++ b/source/blender/blenlib/intern/boxpack_2d.c
@@ -290,7 +290,7 @@ static int vertex_sort(const void *p1, const void *p2, void *vs_ctx_p)
* to have some way of writing the boxes back to the original data.
* \param len: the number of boxes in the array.
* \param r_tot_x, r_tot_y: set so you can normalize the data.
- * */
+ */
void BLI_box_pack_2d(BoxPack *boxarray, const uint len, float *r_tot_x, float *r_tot_y)
{
uint box_index, verts_pack_len, i, j, k;
@@ -312,7 +312,7 @@ void BLI_box_pack_2d(BoxPack *boxarray, const uint len, float *r_tot_x, float *r
/* Sort boxes, biggest first */
qsort(boxarray, (size_t)len, sizeof(BoxPack), box_areasort);
- /* add verts to the boxes, these are only used internally */
+ /* Add verts to the boxes, these are only used internally. */
vert = MEM_mallocN(sizeof(BoxVert[4]) * (size_t)len, "BoxPack Verts");
vertex_pack_indices = MEM_mallocN(sizeof(int[3]) * (size_t)len, "BoxPack Indices");
@@ -357,7 +357,7 @@ void BLI_box_pack_2d(BoxPack *boxarray, const uint len, float *r_tot_x, float *r
/* Pack the First box!
* then enter the main box-packing loop */
- box = boxarray; /* get the first box */
+ box = boxarray; /* Get the first box. */
/* First time, no boxes packed */
box->v[BL]->free = 0; /* Can't use any if these */
box->v[BR]->free &= ~(BLF | BRF);
diff --git a/source/blender/blenlib/intern/expr_pylike_eval.c b/source/blender/blenlib/intern/expr_pylike_eval.c
index f8618c54ea4..a5d4130cb20 100644
--- a/source/blender/blenlib/intern/expr_pylike_eval.c
+++ b/source/blender/blenlib/intern/expr_pylike_eval.c
@@ -66,29 +66,29 @@
* \{ */
typedef enum eOpCode {
- /* Double constant: (-> dval) */
+ /* Double constant: (-> dval). */
OPCODE_CONST,
- /* 1 argument function call: (a -> func1(a)) */
+ /* 1 argument function call: (a -> func1(a)). */
OPCODE_FUNC1,
- /* 2 argument function call: (a b -> func2(a,b)) */
+ /* 2 argument function call: (a b -> func2(a,b)). */
OPCODE_FUNC2,
- /* 3 argument function call: (a b c -> func3(a,b,c)) */
+ /* 3 argument function call: (a b c -> func3(a,b,c)). */
OPCODE_FUNC3,
/* Parameter access: (-> params[ival]) */
OPCODE_PARAMETER,
- /* Minimum of multiple inputs: (a b c... -> min); ival = arg count */
+ /* Minimum of multiple inputs: (a b c... -> min); ival = arg count. */
OPCODE_MIN,
- /* Maximum of multiple inputs: (a b c... -> max); ival = arg count */
+ /* Maximum of multiple inputs: (a b c... -> max); ival = arg count. */
OPCODE_MAX,
/* Jump (pc += jmp_offset) */
OPCODE_JMP,
- /* Pop and jump if zero: (a -> ); JUMP IF NOT a */
+ /* Pop and jump if zero: (a -> ); JUMP IF NOT a. */
OPCODE_JMP_ELSE,
- /* Jump if nonzero, or pop: (a -> a JUMP) IF a ELSE (a -> ) */
+ /* Jump if nonzero, or pop: (a -> a JUMP) IF a ELSE (a -> ). */
OPCODE_JMP_OR,
- /* Jump if zero, or pop: (a -> a JUMP) IF NOT a ELSE (a -> ) */
+ /* Jump if zero, or pop: (a -> a JUMP) IF NOT a ELSE (a -> ). */
OPCODE_JMP_AND,
- /* For comparison chaining: (a b -> 0 JUMP) IF NOT func2(a,b) ELSE (a b -> b) */
+ /* For comparison chaining: (a b -> 0 JUMP) IF NOT func2(a,b) ELSE (a b -> b). */
OPCODE_CMP_CHAIN,
} eOpCode;
diff --git a/source/blender/blenlib/intern/fnmatch.c b/source/blender/blenlib/intern/fnmatch.c
index 33fe34e7c24..6709dfda1be 100644
--- a/source/blender/blenlib/intern/fnmatch.c
+++ b/source/blender/blenlib/intern/fnmatch.c
@@ -239,7 +239,7 @@ fnmatch (const char *pattern, const char *string, int flags)
# undef FOLD
}
-#endif /* _LIBC or not __GNU_LIBRARY__. */
+#endif /* _LIBC or not __GNU_LIBRARY__. */
/* clang-format on */
diff --git a/source/blender/blenlib/intern/hash_md5.c b/source/blender/blenlib/intern/hash_md5.c
index 8c869ce28c3..3db1b7df0fa 100644
--- a/source/blender/blenlib/intern/hash_md5.c
+++ b/source/blender/blenlib/intern/hash_md5.c
@@ -92,7 +92,7 @@ struct md5_ctx {
/* This array contains the bytes used to pad the buffer to the next 64-byte boundary.
* (RFC 1321, 3.1: Step 1) */
-static const unsigned char fillbuf[64] = {0x80, 0 /* , 0, 0, ... */};
+static const unsigned char fillbuf[64] = {0x80, 0 /* , 0, 0, ... */};
/**
* Initialize structure containing state of computation.
@@ -136,7 +136,7 @@ static void md5_process_block(const void *buffer, size_t len, struct md5_ctx *ct
md5_uint32 C = ctx->C;
md5_uint32 D = ctx->D;
- /* Process all bytes in the buffer with 64 bytes in each round of the loop. */
+ /* Process all bytes in the buffer with 64 bytes in each round of the loop. */
while (words < endp) {
md5_uint32 *cwp = correct_words;
md5_uint32 A_save = A;
@@ -161,7 +161,7 @@ static void md5_process_block(const void *buffer, size_t len, struct md5_ctx *ct
* T[i] = (int) (4294967296.0 * fabs (sin (i))), i=1..64
*/
- /* Round 1. */
+ /* Round 1. */
OP(A, B, C, D, 7, 0xd76aa478);
OP(D, A, B, C, 12, 0xe8c7b756);
OP(C, D, A, B, 17, 0x242070db);
@@ -190,7 +190,7 @@ static void md5_process_block(const void *buffer, size_t len, struct md5_ctx *ct
a += b; \
(void)0
- /* Round 2. */
+ /* Round 2. */
OP(FG, A, B, C, D, 1, 5, 0xf61e2562);
OP(FG, D, A, B, C, 6, 9, 0xc040b340);
OP(FG, C, D, A, B, 11, 14, 0x265e5a51);
@@ -208,7 +208,7 @@ static void md5_process_block(const void *buffer, size_t len, struct md5_ctx *ct
OP(FG, C, D, A, B, 7, 14, 0x676f02d9);
OP(FG, B, C, D, A, 12, 20, 0x8d2a4c8a);
- /* Round 3. */
+ /* Round 3. */
OP(FH, A, B, C, D, 5, 4, 0xfffa3942);
OP(FH, D, A, B, C, 8, 11, 0x8771f681);
OP(FH, C, D, A, B, 11, 16, 0x6d9d6122);
@@ -226,7 +226,7 @@ static void md5_process_block(const void *buffer, size_t len, struct md5_ctx *ct
OP(FH, C, D, A, B, 15, 16, 0x1fa27cf8);
OP(FH, B, C, D, A, 2, 23, 0xc4ac5665);
- /* Round 4. */
+ /* Round 4. */
OP(FI, A, B, C, D, 0, 6, 0xf4292244);
OP(FI, D, A, B, C, 7, 10, 0x432aff97);
OP(FI, C, D, A, B, 14, 15, 0xab9423a7);
@@ -246,14 +246,14 @@ static void md5_process_block(const void *buffer, size_t len, struct md5_ctx *ct
#undef OP
- /* Add the starting values of the context. */
+ /* Add the starting values of the context. */
A += A_save;
B += B_save;
C += C_save;
D += D_save;
}
- /* Put checksum in context given as argument. */
+ /* Put checksum in context given as argument. */
ctx->A = A;
ctx->B = B;
ctx->C = C;
@@ -330,7 +330,7 @@ int BLI_hash_md5_stream(FILE *stream, void *resblock)
++len[1];
}
- /* If end of file is reached, end the loop. */
+ /* If end of file is reached, end the loop. */
if (n == 0) {
break;
}
@@ -354,10 +354,10 @@ int BLI_hash_md5_stream(FILE *stream, void *resblock)
*(md5_uint32 *)&buffer[sum + pad] = SWAP(len[0] << 3);
*(md5_uint32 *)&buffer[sum + pad + 4] = SWAP((len[1] << 3) | (len[0] >> 29));
- /* Process last bytes. */
+ /* Process last bytes. */
md5_process_block(buffer, sum + pad + 8, &ctx);
- /* Construct result in desired memory. */
+ /* Construct result in desired memory. */
md5_read_ctx(&ctx, resblock);
return 0;
}
@@ -374,15 +374,15 @@ void *BLI_hash_md5_buffer(const char *buffer, size_t len, void *resblock)
size_t blocks = len & ~63;
size_t pad, rest;
- /* Initialize the computation context. */
+ /* Initialize the computation context. */
md5_init_ctx(&ctx);
- /* Process whole buffer but last len % 64 bytes. */
+ /* Process whole buffer but last len % 64 bytes. */
md5_process_block(buffer, blocks, &ctx);
- /* REST bytes are not processed yet. */
+ /* REST bytes are not processed yet. */
rest = len - blocks;
- /* Copy to own buffer. */
+ /* Copy to own buffer. */
memcpy(restbuf, &buffer[blocks], rest);
/* Append needed fill bytes at end of buffer.
* We can copy 64 bytes because the buffer is always big enough. */
diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c
index c1db9ec1a69..5114d548b9c 100644
--- a/source/blender/blenlib/intern/math_base_inline.c
+++ b/source/blender/blenlib/intern/math_base_inline.c
@@ -192,7 +192,7 @@ MINLINE double ratiod(double min, double max, double pos)
return range == 0 ? 0 : ((pos - min) / range);
}
-/* Map a normalized value, i.e. from interval [0, 1] to interval [a, b] */
+/* Map a normalized value, i.e. from interval [0, 1] to interval [a, b]. */
MINLINE float scalenorm(float a, float b, float x)
{
BLI_assert(x <= 1 && x >= 0);
@@ -760,7 +760,7 @@ MALWAYS_INLINE __m128 _bli_math_fastpow24(const __m128 arg)
__m128 x = _bli_math_fastpow(0x3F4CCCCD, 0x4F55A7FB, arg);
__m128 arg2 = _mm_mul_ps(arg, arg);
__m128 arg4 = _mm_mul_ps(arg2, arg2);
- /* error max = 0.018 avg = 0.0031 |avg| = 0.0031 */
+ /* error max = 0.018 avg = 0.0031 |avg| = 0.0031 */
x = _bli_math_improve_5throot_solution(x, arg4);
/* error max = 0.00021 avg = 1.6e-05 |avg| = 1.6e-05 */
x = _bli_math_improve_5throot_solution(x, arg4);
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index de50ae27b94..272623ab4ec 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -6244,7 +6244,7 @@ float cubic_tangent_factor_circle_v3(const float tan_l[3], const float tan_r[3])
BLI_ASSERT_UNIT_V3(tan_l);
BLI_ASSERT_UNIT_V3(tan_r);
- /* -7f causes instability/glitches with Bendy Bones + Custom Refs */
+ /* -7f causes instability/glitches with Bendy Bones + Custom Refs. */
const float eps = 1e-5f;
const float tan_dot = dot_v3v3(tan_l, tan_r);
diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c
index 469cd573372..52737de227b 100644
--- a/source/blender/blenlib/intern/math_rotation.c
+++ b/source/blender/blenlib/intern/math_rotation.c
@@ -1999,7 +1999,7 @@ void mat4_to_dquat(DualQuat *dq, const float basemat[4][4], const float mat[4][4
if (!is_orthonormal_m3(mat3) || (determinant_m4(mat) < 0.0f) ||
len_squared_v3(dscale) > square_f(1e-4f)) {
- /* extract R and S */
+ /* Extract R and S. */
float tmp[4][4];
/* extra orthogonalize, to avoid flipping with stretched bones */
diff --git a/source/blender/blenlib/intern/mesh_intersect.cc b/source/blender/blenlib/intern/mesh_intersect.cc
index 5b7b6d9a929..32f0216951a 100644
--- a/source/blender/blenlib/intern/mesh_intersect.cc
+++ b/source/blender/blenlib/intern/mesh_intersect.cc
@@ -2246,7 +2246,7 @@ class TriOverlaps {
}
overlap_tot_ += overlap_tot_;
}
- /* Sort the overlaps to bring all the intersects with a given indexA together. */
+ /* Sort the overlaps to bring all the intersects with a given indexA together. */
std::sort(overlap_, overlap_ + overlap_tot_, bvhtreeverlap_cmp);
if (dbg_level > 0) {
std::cout << overlap_tot_ << " overlaps found:\n";
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c
index 8964dac31a9..19b925535e2 100644
--- a/source/blender/blenlib/intern/storage.c
+++ b/source/blender/blenlib/intern/storage.c
@@ -47,7 +47,7 @@
#endif
#include <fcntl.h>
-#include <string.h> /* strcpy etc.. */
+#include <string.h> /* `strcpy` etc. */
#ifdef WIN32
# include "BLI_string_utf8.h"
diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.c
index 7aa5930b4ad..3a02ddaa349 100644
--- a/source/blender/blenlib/intern/string_utf8.c
+++ b/source/blender/blenlib/intern/string_utf8.c
@@ -290,7 +290,7 @@ size_t BLI_strncpy_utf8_rlen(char *__restrict dst, const char *__restrict src, s
#undef BLI_STR_UTF8_CPY
/* --------------------------------------------------------------------------*/
-/* wchar_t / utf8 functions */
+/* wchar_t / utf8 functions */
size_t BLI_strncpy_wchar_as_utf8(char *__restrict dst,
const wchar_t *__restrict src,
@@ -401,7 +401,7 @@ size_t BLI_strncpy_wchar_from_utf8(wchar_t *__restrict dst_w,
#endif
}
-/* end wchar_t / utf8 functions */
+/* end wchar_t / utf8 functions */
/* --------------------------------------------------------------------------*/
/* count columns that character/string occupies, based on wcwidth.c */
diff --git a/source/blender/blenlib/intern/string_utils.c b/source/blender/blenlib/intern/string_utils.c
index c847f7e1921..6a2ed8fac2c 100644
--- a/source/blender/blenlib/intern/string_utils.c
+++ b/source/blender/blenlib/intern/string_utils.c
@@ -194,7 +194,7 @@ void BLI_string_flip_side_name(char *r_name,
BLI_strncpy(prefix, r_name, name_len);
- /* first case; separator . - _ with extensions r R l L */
+ /* first case; separator . - _ with extensions r R l L. */
if ((len > 1) && is_char_sep(r_name[len - 2])) {
is_set = true;
switch (r_name[len - 1]) {
diff --git a/source/blender/blenlib/intern/system_win32.c b/source/blender/blenlib/intern/system_win32.c
index 7572936592e..f65234b656b 100644
--- a/source/blender/blenlib/intern/system_win32.c
+++ b/source/blender/blenlib/intern/system_win32.c
@@ -309,7 +309,7 @@ static bool BLI_windows_system_backtrace_stack(FILE *fp)
/* If we are handling an exception use the context record from that. */
if (current_exception && current_exception->ExceptionRecord->ExceptionAddress) {
/* The back trace code will write to the context record, to protect the original record from
- * modifications give the backtrace a copy to work on. */
+ * modifications give the backtrace a copy to work on. */
CONTEXT TempContext = *current_exception->ContextRecord;
return BLI_windows_system_backtrace_run_trace(fp, GetCurrentThread(), &TempContext);
}
diff --git a/source/blender/blenlib/tests/BLI_mesh_intersect_test.cc b/source/blender/blenlib/tests/BLI_mesh_intersect_test.cc
index 769cadd2f47..ec57cf29cad 100644
--- a/source/blender/blenlib/tests/BLI_mesh_intersect_test.cc
+++ b/source/blender/blenlib/tests/BLI_mesh_intersect_test.cc
@@ -389,7 +389,7 @@ TEST(mesh_intersect, TwoTris)
{4, 13, 6, 2}, /* 11: non-parallel planes, not intersecting, all one side. */
{0, 14, 6, 2}, /* 12: non-paralel planes, not intersecting, alternate sides. */
/* Following are all coplanar cases. */
- {15, 16, 6, 8}, /* 13: T16 inside T15. Note: dup'd tri is expected. */
+ {15, 16, 6, 8}, /* 13: T16 inside T15. Note: dup'd tri is expected. */
{15, 17, 8, 8}, /* 14: T17 intersects one edge of T15 at (1,1,0)(3,3,0). */
{15, 18, 10, 12}, /* 15: T18 intersects T15 at (1,1,0)(3,3,0)(3,15/4,1/2)(0,3,2). */
{15, 19, 8, 10}, /* 16: T19 intersects T15 at (3,3,0)(0,3,2). */