diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-06-24 08:56:58 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-06-24 08:59:34 +0300 |
commit | 4b9ff3cd42be427e478743648e9951bf8c189a04 (patch) | |
tree | b0cb1462a8fdae38df4a0a1067349f3118d56a43 /source/blender/blenlib/intern | |
parent | 2e99a74df9ecfa18c4081cdcc82227e2e24f14b1 (diff) |
Cleanup: comment blocks, trailing space in comments
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r-- | source/blender/blenlib/intern/BLI_filelist.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/DLRB_tree.c | 4 | ||||
-rw-r--r-- | source/blender/blenlib/intern/boxpack_2d.c | 6 | ||||
-rw-r--r-- | source/blender/blenlib/intern/expr_pylike_eval.c | 20 | ||||
-rw-r--r-- | source/blender/blenlib/intern/fnmatch.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/hash_md5.c | 30 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_base_inline.c | 4 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_geom.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_rotation.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/mesh_intersect.cc | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/storage.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/string_utf8.c | 4 | ||||
-rw-r--r-- | source/blender/blenlib/intern/string_utils.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/system_win32.c | 2 |
14 files changed, 42 insertions, 42 deletions
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); } |