diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-06-28 08:44:12 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-06-28 08:46:08 +0300 |
commit | 1d8648b13a0667d338a4e60df004be7e41525968 (patch) | |
tree | 763c9e0b843850f6894101c8ad02a6bff34b5497 /source/blender/blenlib | |
parent | 23c4854f45d7cafa1cfadf13556b9277d4666bd1 (diff) |
Cleanup: repeated terms in code comments & error messages
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_vector.hh | 8 | ||||
-rw-r--r-- | source/blender/blenlib/intern/BLI_kdopbvh.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/kdtree_impl.h | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_color.c | 16 | ||||
-rw-r--r-- | source/blender/blenlib/intern/mesh_intersect.cc | 8 | ||||
-rw-r--r-- | source/blender/blenlib/intern/stack.c | 4 | ||||
-rw-r--r-- | source/blender/blenlib/intern/string.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_listbase_test.cc | 2 |
8 files changed, 24 insertions, 20 deletions
diff --git a/source/blender/blenlib/BLI_vector.hh b/source/blender/blenlib/BLI_vector.hh index 0e878d549c1..5b88ad6fa7d 100644 --- a/source/blender/blenlib/BLI_vector.hh +++ b/source/blender/blenlib/BLI_vector.hh @@ -507,10 +507,10 @@ class Vector { } /** - * Enlarges the size of the internal buffer that is considered to be initialized. This invokes - * undefined behavior when when the new size is larger than the capacity. The method can be - * useful when you want to call constructors in the vector yourself. This should only be done in - * very rare cases and has to be justified every time. + * Enlarges the size of the internal buffer that is considered to be initialized. + * This invokes undefined behavior when the new size is larger than the capacity. + * The method can be useful when you want to call constructors in the vector yourself. + * This should only be done in very rare cases and has to be justified every time. */ void increase_size_by_unchecked(const int64_t n) noexcept { diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index a0e94e00634..8f556e0ddb6 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -1212,7 +1212,7 @@ static void tree_overlap_traverse_cb(BVHOverlapData_Thread *data_thread, } /** - * a version of #tree_overlap_traverse_cb that that break on first true return. + * a version of #tree_overlap_traverse_cb that break on first true return. */ static bool tree_overlap_traverse_num(BVHOverlapData_Thread *data_thread, const BVHNode *node1, diff --git a/source/blender/blenlib/intern/kdtree_impl.h b/source/blender/blenlib/intern/kdtree_impl.h index 2a0e8b3ec68..2aec3ce082a 100644 --- a/source/blender/blenlib/intern/kdtree_impl.h +++ b/source/blender/blenlib/intern/kdtree_impl.h @@ -967,7 +967,7 @@ static int kdtree_node_cmp_deduplicate(const void *n0_p, const void *n1_p) } /** - * Remove exact duplicates (run before before balancing). + * Remove exact duplicates (run before balancing). * * Keep the first element added when duplicates are found. */ diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c index 67c4ad95d79..263c508c07c 100644 --- a/source/blender/blenlib/intern/math_color.c +++ b/source/blender/blenlib/intern/math_color.c @@ -717,13 +717,17 @@ void blackbody_temperature_to_rgb_table(float *r_table, int width, float min, fl /* ****************************** wavelength ******************************** */ /* Wavelength to RGB. */ -/* CIE colour matching functions xBar, yBar, and zBar for - * wavelengths from 380 through 780 nanometers, every 5 - * nanometers. +/** + * CIE color matching functions `xBar`, `yBar`, and `zBar` for + * wavelengths from 380 through 780 nanometers, every 5 nanometers. + * * For a wavelength lambda in this range: - * cie_colour_match[(lambda - 380) / 5][0] = xBar - * cie_colour_match[(lambda - 380) / 5][1] = yBar - * cie_colour_match[(lambda - 380) / 5][2] = zBar */ + * \code{.txt} + * cie_color_match[(lambda - 380) / 5][0] = xBar + * cie_color_match[(lambda - 380) / 5][1] = yBar + * cie_color_match[(lambda - 380) / 5][2] = zBar + * \endcode + */ static float cie_colour_match[81][3] = { {0.0014f, 0.0000f, 0.0065f}, {0.0022f, 0.0001f, 0.0105f}, {0.0042f, 0.0001f, 0.0201f}, diff --git a/source/blender/blenlib/intern/mesh_intersect.cc b/source/blender/blenlib/intern/mesh_intersect.cc index a9c725d4adf..988988179fd 100644 --- a/source/blender/blenlib/intern/mesh_intersect.cc +++ b/source/blender/blenlib/intern/mesh_intersect.cc @@ -1386,7 +1386,7 @@ static ITT_value intersect_tri_tri(const IMesh &tm, int t1, int t2) int sr1 = filter_plane_side(d_r1, d_r2, d_n2, abs_d_r1, abs_d_r2, abs_d_n2); if ((sp1 > 0 && sq1 > 0 && sr1 > 0) || (sp1 < 0 && sq1 < 0 && sr1 < 0)) { # ifdef PERFDEBUG - incperfcount(2); /* Tri tri intersects decided by filter plane tests. */ + incperfcount(2); /* Triangle-triangle intersects decided by filter plane tests. */ # endif if (dbg_level > 0) { std::cout << "no intersection, all t1's verts above or below t2\n"; @@ -1404,7 +1404,7 @@ static ITT_value intersect_tri_tri(const IMesh &tm, int t1, int t2) int sr2 = filter_plane_side(d_r2, d_r1, d_n1, abs_d_r2, abs_d_r1, abs_d_n1); if ((sp2 > 0 && sq2 > 0 && sr2 > 0) || (sp2 < 0 && sq2 < 0 && sr2 < 0)) { # ifdef PERFDEBUG - incperfcount(2); /* Tri tri intersects decided by filter plane tests. */ + incperfcount(2); /* Triangle-triangle intersects decided by filter plane tests. */ # endif if (dbg_level > 0) { std::cout << "no intersection, all t2's verts above or below t1\n"; @@ -1446,7 +1446,7 @@ static ITT_value intersect_tri_tri(const IMesh &tm, int t1, int t2) std::cout << "no intersection, all t1's verts above or below t2 (exact)\n"; } # ifdef PERFDEBUG - incperfcount(3); /* Tri tri intersects decided by exact plane tests. */ + incperfcount(3); /* Triangle-triangle intersects decided by exact plane tests. */ # endif return ITT_value(INONE); } @@ -1478,7 +1478,7 @@ static ITT_value intersect_tri_tri(const IMesh &tm, int t1, int t2) std::cout << "no intersection, all t2's verts above or below t1 (exact)\n"; } # ifdef PERFDEBUG - incperfcount(3); /* Tri tri intersects decided by exact plane tests. */ + incperfcount(3); /* Triangle-triangle intersects decided by exact plane tests. */ # endif return ITT_value(INONE); } diff --git a/source/blender/blenlib/intern/stack.c b/source/blender/blenlib/intern/stack.c index f2e8b352aab..4a9bdd48a0a 100644 --- a/source/blender/blenlib/intern/stack.c +++ b/source/blender/blenlib/intern/stack.c @@ -182,7 +182,7 @@ void BLI_stack_pop(BLI_Stack *stack, void *dst) } /** - * A version of #BLI_stack_pop which which fills in an array. + * A version of #BLI_stack_pop which fills in an array. * * \param dst: The destination array, * must be at least (#BLI_Stack.elem_size * \a n) bytes long. @@ -201,7 +201,7 @@ void BLI_stack_pop_n(BLI_Stack *stack, void *dst, unsigned int n) } /** - * A version of #BLI_stack_pop_n which which fills in an array (in the reverse order). + * A version of #BLI_stack_pop_n which fills in an array (in the reverse order). * * \note The first item in the array will be first item added to the stack. */ diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c index b2b8d6a0f24..61d095658a3 100644 --- a/source/blender/blenlib/intern/string.c +++ b/source/blender/blenlib/intern/string.c @@ -370,7 +370,7 @@ size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, const si * \param src: The escaped source string. * \param dst_maxncpy: The maximum number of bytes allowable to copy. * - * \note This is used for for parsing animation paths in blend files. + * \note This is used for parsing animation paths in blend files. */ size_t BLI_str_unescape(char *__restrict dst, const char *__restrict src, const size_t src_maxncpy) { diff --git a/source/blender/blenlib/tests/BLI_listbase_test.cc b/source/blender/blenlib/tests/BLI_listbase_test.cc index ff85cf79e87..0ba08a0cd48 100644 --- a/source/blender/blenlib/tests/BLI_listbase_test.cc +++ b/source/blender/blenlib/tests/BLI_listbase_test.cc @@ -192,7 +192,7 @@ TEST(listbase, Sort) EXPECT_TRUE(listbase_is_valid(&words_lb)); } - /* sort single single */ + /* Sort single list. */ { LinkData link; link.data = words; |