diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-07-03 16:08:40 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-07-03 17:43:40 +0300 |
commit | 9b89de2571b0c3fa2276b5c2ae589e0ec831d1f5 (patch) | |
tree | 63f1007a5262b4d6f1c1a96734c521d836eb6fc6 /source/blender/blenlib/intern | |
parent | 05f970847e12ce30e8c4c624677d94ae239ce2bc (diff) |
Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXX
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
Diffstat (limited to 'source/blender/blenlib/intern')
21 files changed, 54 insertions, 51 deletions
diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c index 8463c0ec511..46e599b7cf3 100644 --- a/source/blender/blenlib/intern/BLI_ghash.c +++ b/source/blender/blenlib/intern/BLI_ghash.c @@ -611,7 +611,7 @@ static Entry *ghash_pop(GHash *gh, GHashIterState *state) return NULL; } - /* Note: using first_bucket_index here allows us to avoid potential + /* NOTE: using first_bucket_index here allows us to avoid potential * huge number of loops over buckets, * in case we are popping from a large ghash with few items in it... */ curr_bucket = ghash_find_next_bucket_index(gh, curr_bucket); @@ -677,7 +677,7 @@ static GHash *ghash_copy(const GHash *gh, GHashKeyCopyFP keycopyfp, GHashValCopy * This means entries in buckets in new copy will be in reversed order! * This shall not be an issue though, since order should never be assumed in ghash. */ - /* Note: We can use 'i' here, since we are sure that + /* NOTE: We can use 'i' here, since we are sure that * 'gh' and 'gh_new' have the same number of buckets! */ e_new->next = gh_new->buckets[i]; gh_new->buckets[i] = e_new; diff --git a/source/blender/blenlib/intern/BLI_ghash_utils.c b/source/blender/blenlib/intern/BLI_ghash_utils.c index 83f64043cd0..182c27aed6d 100644 --- a/source/blender/blenlib/intern/BLI_ghash_utils.c +++ b/source/blender/blenlib/intern/BLI_ghash_utils.c @@ -53,7 +53,7 @@ uint BLI_ghashutil_ptrhash(const void *key) /* bottom 3 or 4 bits are likely to be 0; rotate y by 4 to avoid * excessive hash collisions for dicts and sets */ - /* Note: Unlike Python 'sizeof(uint)' is used instead of 'sizeof(void *)', + /* NOTE: Unlike Python 'sizeof(uint)' is used instead of 'sizeof(void *)', * Otherwise casting to 'uint' ignores the upper bits on 64bit platforms. */ return (uint)(y >> 4) | ((uint)y << (sizeof(uint[8]) - 4)); } @@ -141,7 +141,7 @@ size_t BLI_ghashutil_combine_hash(size_t hash_a, size_t hash_b) * string, is updated: ``hash = hash * 33 + c``. This * function uses the signed value of each byte. * - * note: this is the same hash method that glib 2.34.0 uses. + * NOTE: this is the same hash method that glib 2.34.0 uses. */ uint BLI_ghashutil_strhash_n(const char *key, size_t n) { diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index 8f556e0ddb6..ebd6ee4d596 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -26,7 +26,7 @@ * * See: http://www.gris.uni-tuebingen.de/people/staff/jmezger/papers/bvh.pdf * - * implements a bvh-tree structure with support for: + * implements a BVH-tree structure with support for: * * - Ray-cast: * #BLI_bvhtree_ray_cast, #BVHRayCastData @@ -726,7 +726,7 @@ static void non_recursive_bvh_div_nodes_task_cb(void *__restrict userdata, /* Save split axis (this can be used on ray-tracing to speedup the query time) */ parent->main_axis = split_axis / 2; - /* Split the children along the split_axis, note: its not needed to sort the whole leafs array + /* Split the children along the split_axis, NOTE: its not needed to sort the whole leafs array * Only to assure that the elements are partitioned on a way that each child takes the elements * it would take in case the whole array was sorted. * Split_leafs takes care of that "sort" problem. */ @@ -1805,7 +1805,7 @@ static float ray_nearest_hit(const BVHRayCastData *data, const float bv[6]) * Based on Tactical Optimization of Ray/Box Intersection, by Graham Fyffe * [http://tog.acm.org/resources/RTNews/html/rtnv21n1.html#art9] * - * TODO this doesn't take data->ray.radius into consideration */ + * TODO: this doesn't take data->ray.radius into consideration. */ static float fast_ray_nearest_hit(const BVHRayCastData *data, const BVHNode *node) { const float *bv = node->bv; diff --git a/source/blender/blenlib/intern/BLI_mempool.c b/source/blender/blenlib/intern/BLI_mempool.c index 8196438eb25..ff17f816588 100644 --- a/source/blender/blenlib/intern/BLI_mempool.c +++ b/source/blender/blenlib/intern/BLI_mempool.c @@ -47,7 +47,7 @@ # include "valgrind/memcheck.h" #endif -/* note: copied from BLO_blend_defs.h, don't use here because we're in BLI */ +/* NOTE: copied from BLO_blend_defs.h, don't use here because we're in BLI. */ #ifdef __BIG_ENDIAN__ /* Big Endian */ # define MAKE_ID(a, b, c, d) ((int)(a) << 24 | (int)(b) << 16 | (c) << 8 | (d)) diff --git a/source/blender/blenlib/intern/array_store.c b/source/blender/blenlib/intern/array_store.c index 250915383cf..e1a7ee98ce5 100644 --- a/source/blender/blenlib/intern/array_store.c +++ b/source/blender/blenlib/intern/array_store.c @@ -191,7 +191,7 @@ # define BCHUNK_SIZE_MIN_DIV 8 /* Disallow chunks bigger than the regular chunk size scaled by this value - * note: must be at least 2! + * NOTE: must be at least 2! * however, this code runs won't run in tests unless it's ~1.1 ugh. * so lower only to check splitting works. */ @@ -980,7 +980,7 @@ static const BChunkRef *table_lookup(const BArrayInfo *info, const size_t offset, const hash_key *UNUSED(table_hash_array)) { - const size_t data_hash_len = BCHUNK_HASH_LEN * info->chunk_stride; /* TODO, cache */ + const size_t data_hash_len = BCHUNK_HASH_LEN * info->chunk_stride; /* TODO: cache. */ size_t size_left = data_len - offset; hash_key key = hash_data(&data[offset], MIN2(data_hash_len, size_left)); @@ -1155,7 +1155,7 @@ static BChunkList *bchunk_list_from_data_merge(const BArrayInfo *info, use_aligned = true; } else { - /* TODO, walk over chunks and check if some arbitrary amount align */ + /* TODO: walk over chunks and check if some arbitrary amount align. */ } } #endif /* USE_ALIGN_CHUNKS_TEST */ @@ -1787,7 +1787,7 @@ bool BLI_array_store_is_valid(BArrayStore *bs) } return ok; - /* TODO, dangling pointer checks */ + /* TODO: dangling pointer checks. */ } /** \} */ diff --git a/source/blender/blenlib/intern/bitmap_draw_2d.c b/source/blender/blenlib/intern/bitmap_draw_2d.c index 9d3b66d72d7..b0afe1349ad 100644 --- a/source/blender/blenlib/intern/bitmap_draw_2d.c +++ b/source/blender/blenlib/intern/bitmap_draw_2d.c @@ -496,7 +496,7 @@ void BLI_bitmap_draw_2d_poly_v2i_n(const int xmin, /* Scan for new x-nodes */ while ((span_y_index < span_y_len) && (verts[span_y[span_y_index][0]][1] == pixel_y)) { - /* note, node_x these are just added at the end, + /* NOTE: node_x these are just added at the end, * not ideal but sorting once will resolve. */ /* x is initialized for the next pixel_y */ diff --git a/source/blender/blenlib/intern/delaunay_2d.cc b/source/blender/blenlib/intern/delaunay_2d.cc index 91d63e3444e..24a58103a10 100644 --- a/source/blender/blenlib/intern/delaunay_2d.cc +++ b/source/blender/blenlib/intern/delaunay_2d.cc @@ -2108,7 +2108,7 @@ template<typename T> void add_edge_constraints(CDT_state<T> *cdt_state, const CD * for the boundary of the input face. * fedge_start..fedge_end is the inclusive range of edge input ids that are for the given face. * - * Note: if the input face is not CCW oriented, we'll be labeling the outside, not the inside. + * NOTE: if the input face is not CCW oriented, we'll be labeling the outside, not the inside. * Note 2: if the boundary has self-crossings, this method will arbitrarily pick one of the * contiguous set of faces enclosed by parts of the boundary, leaving the other such un-tagged. * This may be a feature instead of a bug if the first contiguous section is most of the face and diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c index 107c27da6a2..1a00142ddb1 100644 --- a/source/blender/blenlib/intern/fileops.c +++ b/source/blender/blenlib/intern/fileops.c @@ -64,7 +64,7 @@ #if 0 /* UNUSED */ /* gzip the file in from and write it to "to". * return -1 if zlib fails, -2 if the originating file does not exist - * note: will remove the "from" file + * NOTE: will remove the "from" file */ int BLI_file_gzip(const char *from, const char *to) { @@ -355,7 +355,7 @@ void *BLI_gzopen(const char *filename, const char *mode) BLI_assert(!BLI_path_is_rel(filename)); - /* xxx Creates file before transcribing the path */ + /* XXX: Creates file before transcribing the path. */ if (mode[0] == 'w') { FILE *file = ufopen(filename, "a"); if (file == NULL) { diff --git a/source/blender/blenlib/intern/kdtree_impl.h b/source/blender/blenlib/intern/kdtree_impl.h index 2aec3ce082a..0c9de0aa128 100644 --- a/source/blender/blenlib/intern/kdtree_impl.h +++ b/source/blender/blenlib/intern/kdtree_impl.h @@ -132,7 +132,7 @@ void BLI_kdtree_nd_(insert)(KDTree *tree, int index, const float co[KD_DIMS]) BLI_assert(tree->nodes_len <= tree->nodes_len_capacity); #endif - /* note, array isn't calloc'd, + /* NOTE: array isn't calloc'd, * need to initialize all struct members */ node->left = node->right = KD_NODE_UNSET; diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c index 3175bf116a0..80f0008c7eb 100644 --- a/source/blender/blenlib/intern/math_geom.c +++ b/source/blender/blenlib/intern/math_geom.c @@ -1756,8 +1756,8 @@ bool isect_ray_tri_v3(const float ray_origin[3], float *r_lambda, float r_uv[2]) { - /* note: these values were 0.000001 in 2.4x but for projection snapping on - * a human head (1BU == 1m), subsurf level 2, this gave many errors - campbell */ + /* NOTE(campbell): these values were 0.000001 in 2.4x but for projection snapping on + * a human head (1BU == 1m), subsurf level 2, this gave many errors. */ const float epsilon = 0.00000001f; float p[3], s[3], e1[3], e2[3], q[3]; float a, f, u, v; @@ -3287,8 +3287,8 @@ bool isect_ray_aabb_v3(const struct IsectRayAABB_Precalc *data, tmin = tzmin; } - /* Note: tmax does not need to be updated since we don't use it - * keeping this here for future reference - jwilkins */ + /* NOTE(jwilkins): tmax does not need to be updated since we don't use it + * keeping this here for future reference. */ // if (tzmax < tmax) tmax = tzmax; if (tmin_out) { @@ -3559,7 +3559,7 @@ static bool point_in_slice(const float p[3], sub_v3_v3v3(rp, p, v1); h = dot_v3v3(q, rp) / dot_v3v3(q, q); - /* note: when 'h' is nan/-nan, this check returns false + /* NOTE: when 'h' is nan/-nan, this check returns false * without explicit check - covering the degenerate case */ return (h >= 0.0f && h <= 1.0f); } @@ -4020,7 +4020,7 @@ void barycentric_weights_v2_persp( /** * same as #barycentric_weights_v2 but works with a quad, - * note: untested for values outside the quad's bounds + * NOTE: untested for values outside the quad's bounds * this is #interp_weights_poly_v2 expanded for quads only */ void barycentric_weights_v2_quad(const float v1[2], @@ -4030,10 +4030,11 @@ void barycentric_weights_v2_quad(const float v1[2], const float co[2], float w[4]) { - /* note: fabsf() here is not needed for convex quads (and not used in interp_weights_poly_v2). - * but in the case of concave/bow-tie quads for the mask rasterizer it gives unreliable results - * without adding absf(). If this becomes an issue for more general usage we could have - * this optional or use a different function - Campbell */ + /* NOTE(campbell): fabsf() here is not needed for convex quads + * (and not used in #interp_weights_poly_v2). + * But in the case of concave/bow-tie quads for the mask rasterizer it + * gives unreliable results without adding absf(). If this becomes an issue for more general + * usage we could have this optional or use a different function. */ #define MEAN_VALUE_HALF_TAN_V2(_area, i1, i2) \ ((_area = cross_v2v2(dirs[i1], dirs[i2])) != 0.0f ? \ fabsf(((lens[i1] * lens[i2]) - dot_v2v2(dirs[i1], dirs[i2])) / _area) : \ @@ -4820,7 +4821,7 @@ void orthographic_m4(float matrix[4][4], matrix[3][0] = -(right + left) / Xdelta; matrix[1][1] = 2.0f / Ydelta; matrix[3][1] = -(top + bottom) / Ydelta; - matrix[2][2] = -2.0f / Zdelta; /* note: negate Z */ + matrix[2][2] = -2.0f / Zdelta; /* NOTE: negate Z. */ matrix[3][2] = -(farClip + nearClip) / Zdelta; } @@ -4844,7 +4845,7 @@ void perspective_m4(float mat[4][4], } mat[0][0] = nearClip * 2.0f / Xdelta; mat[1][1] = nearClip * 2.0f / Ydelta; - mat[2][0] = (right + left) / Xdelta; /* note: negate Z */ + mat[2][0] = (right + left) / Xdelta; /* NOTE: negate Z. */ mat[2][1] = (top + bottom) / Ydelta; mat[2][2] = -(farClip + nearClip) / Zdelta; mat[2][3] = -1.0f; diff --git a/source/blender/blenlib/intern/math_interp.c b/source/blender/blenlib/intern/math_interp.c index 163a3ab5fe3..04fae6a0e68 100644 --- a/source/blender/blenlib/intern/math_interp.c +++ b/source/blender/blenlib/intern/math_interp.c @@ -655,7 +655,7 @@ void BLI_ewa_filter(const int width, v2 = (int)(ceilf(V0 + ve)); /* sane clamping to avoid unnecessarily huge loops */ - /* note: if eccentricity gets clamped (see above), + /* NOTE: if eccentricity gets clamped (see above), * the ue/ve limits can also be lowered accordingly */ if (U0 - (float)u1 > EWA_MAXIDX) { diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c index 88bef854213..5920788821c 100644 --- a/source/blender/blenlib/intern/math_matrix.c +++ b/source/blender/blenlib/intern/math_matrix.c @@ -1291,7 +1291,7 @@ bool invert_m4_m4(float inverse[4][4], const float mat[4][4]) * to the Aligned Inherit Scale mode, in order to avoid creating shear. * If A scale is uniform, the result is equivalent to ordinary multiplication. * - * Note: this effectively takes output location from simple multiplication, + * NOTE: this effectively takes output location from simple multiplication, * and uses mul_m4_m4m4_split_channels for rotation and scale. */ void mul_m4_m4m4_aligned_scale(float R[4][4], const float A[4][4], const float B[4][4]) @@ -2274,8 +2274,8 @@ void mat4_to_loc_quat(float loc[3], float quat[4], const float wmat[4][4]) copy_m3_m4(mat3, wmat); normalize_m3_m3(mat3_n, mat3); - /* so scale doesn't interfere with rotation T24291. */ - /* note: this is a workaround for negative matrix not working for rotation conversion, FIXME */ + /* So scale doesn't interfere with rotation T24291. */ + /* FIXME: this is a workaround for negative matrix not working for rotation conversion. */ if (is_negative_m3(mat3)) { negate_m3(mat3_n); } diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c index 52737de227b..db2b7c055a5 100644 --- a/source/blender/blenlib/intern/math_rotation.c +++ b/source/blender/blenlib/intern/math_rotation.c @@ -511,7 +511,7 @@ void rotation_between_vecs_to_mat3(float m[3][3], const float v1[3], const float } } -/* note: expects vectors to be normalized */ +/* NOTE: expects vectors to be normalized. */ void rotation_between_vecs_to_quat(float q[4], const float v1[3], const float v2[3]) { float axis[3]; diff --git a/source/blender/blenlib/intern/mesh_intersect.cc b/source/blender/blenlib/intern/mesh_intersect.cc index 988988179fd..f6a0d22d3a7 100644 --- a/source/blender/blenlib/intern/mesh_intersect.cc +++ b/source/blender/blenlib/intern/mesh_intersect.cc @@ -1037,7 +1037,7 @@ static mpq2 project_3d_to_2d(const mpq3 &p3d, int proj_axis) * So the sign of E is the same as the sign of E_exact if * |E| > supremum(E) * index(E) * DBL_EPSILON * - * Note: a possible speedup would be to have a simple function + * NOTE: a possible speedup would be to have a simple function * that calculates the error bound if one knows that all values * are less than some global maximum - most of the function would * be calculated ahead of time. The global max could be passed diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index f3c348b2b44..f9f5411d673 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -240,7 +240,7 @@ void BLI_path_normalize(const char *relabase, char *path) * simply strip this prefix then evaluate the path as usual. * pythons os.path.normpath() does this */ - /* Note: previous version of following call used an offset of 3 instead of 4, + /* NOTE: previous version of following call used an offset of 3 instead of 4, * which meant that the "/../home/me" example actually became "home/me". * Using offset of 3 gives behavior consistent with the aforementioned * Python routine. */ diff --git a/source/blender/blenlib/intern/polyfill_2d.c b/source/blender/blenlib/intern/polyfill_2d.c index dadef979b09..817572ba85c 100644 --- a/source/blender/blenlib/intern/polyfill_2d.c +++ b/source/blender/blenlib/intern/polyfill_2d.c @@ -719,7 +719,7 @@ static bool pf_ear_tip_check(PolyFill *pf, PolyIndex *pi_ear_tip) * the area sign will be positive if the point is strictly inside. * It will be 0 on the edge, which we want to include as well. */ - /* note: check (v3, v1) first since it fails _far_ more often than the other 2 checks + /* NOTE: check (v3, v1) first since it fails _far_ more often than the other 2 checks * (those fail equally). * It's logical - the chance is low that points exist on the * same side as the ear we're clipping off. */ diff --git a/source/blender/blenlib/intern/polyfill_2d_beautify.c b/source/blender/blenlib/intern/polyfill_2d_beautify.c index 7425bab885c..7781e3a0f6f 100644 --- a/source/blender/blenlib/intern/polyfill_2d_beautify.c +++ b/source/blender/blenlib/intern/polyfill_2d_beautify.c @@ -175,7 +175,7 @@ float BLI_polyfill_beautify_quad_rotate_calc_ex(const float v1[2], len_13 = len_v2v2(v1, v3); len_24 = len_v2v2(v2, v4); - /* note, area is in fact (area * 2), + /* NOTE: area is in fact (area * 2), * but in this case its OK, since we're comparing ratios */ /* edge (2-4), current state */ diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c index 8c9a229860e..b0d00007580 100644 --- a/source/blender/blenlib/intern/scanfill.c +++ b/source/blender/blenlib/intern/scanfill.c @@ -397,7 +397,7 @@ static void testvertexnearedge(ScanFillContext *sf_ctx) for (eve = sf_ctx->fillvertbase.first; eve; eve = eve->next) { if (eve->edge_tot == 1) { /* find the edge which has vertex eve, - * note: we _know_ this will crash if 'ed1' becomes NULL + * NOTE: we _know_ this will crash if 'ed1' becomes NULL * but this will never happen. */ for (ed1 = sf_ctx->filledgebase.first; !(ed1->v1 == eve || ed1->v2 == eve); ed1 = ed1->next) { @@ -529,7 +529,7 @@ static unsigned int scanfill(ScanFillContext *sf_ctx, PolyFill *pf, const int fl 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 poly-fill, 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++; } diff --git a/source/blender/blenlib/intern/smallhash.c b/source/blender/blenlib/intern/smallhash.c index 5961893cae3..6e5a3e961a5 100644 --- a/source/blender/blenlib/intern/smallhash.c +++ b/source/blender/blenlib/intern/smallhash.c @@ -124,7 +124,7 @@ BLI_INLINE SmallHashEntry *smallhash_lookup(const SmallHash *sh, const uintptr_t BLI_assert(key != SMHASH_KEY_UNUSED); - /* note: there are always more buckets than entries, + /* NOTE: there are always more buckets than entries, * so we know there will always be a free bucket if the key isn't found. */ for (e = &sh->buckets[h % sh->nbuckets]; e->val != SMHASH_CELL_FREE; h = SMHASH_NEXT(h, hoff), e = &sh->buckets[h % sh->nbuckets]) { @@ -353,8 +353,8 @@ void **BLI_smallhash_iternew_p(const SmallHash *sh, SmallHashIter *iter, uintptr /** \name Debugging & Introspection * \{ */ -/* note, this was called _print_smhash in knifetool.c - * it may not be intended for general use - campbell */ +/* NOTE(campbell): this was called _print_smhash in knifetool.c + * it may not be intended for general use. */ #if 0 void BLI_smallhash_print(SmallHash *sh) { diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.c index 3a02ddaa349..19ff8764259 100644 --- a/source/blender/blenlib/intern/string_utf8.c +++ b/source/blender/blenlib/intern/string_utf8.c @@ -43,7 +43,7 @@ // #define DEBUG_STRSIZE /* array copied from glib's gutf8.c, */ -/* Note: last two values (0xfe and 0xff) are forbidden in utf-8, +/* NOTE: last two values (0xfe and 0xff) are forbidden in utf-8, * so they are considered 1 byte length too. */ static const size_t utf8_skip_data[256] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -265,7 +265,7 @@ char *BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t memset(dst, 0xff, sizeof(*dst) * maxncpy); #endif - /* note: currently we don't attempt to deal with invalid utf8 chars */ + /* NOTE: currently we don't attempt to deal with invalid utf8 chars. */ BLI_STR_UTF8_CPY(dst, src, maxncpy); return r_dst; @@ -281,7 +281,7 @@ size_t BLI_strncpy_utf8_rlen(char *__restrict dst, const char *__restrict src, s memset(dst, 0xff, sizeof(*dst) * maxncpy); #endif - /* note: currently we don't attempt to deal with invalid utf8 chars */ + /* NOTE: currently we don't attempt to deal with invalid utf8 chars. */ BLI_STR_UTF8_CPY(dst, src, maxncpy); return (size_t)(dst - r_dst); @@ -444,8 +444,8 @@ int BLI_str_utf8_char_width_safe(const char *p) /* copied from glib's gutf8.c, added 'Err' arg */ -/* note, glib uses uint for unicode, best we do the same, - * though we don't typedef it - campbell */ +/* NOTE(campbell): glib uses uint for unicode, best we do the same, + * though we don't typedef it. */ #define UTF8_COMPUTE(Char, Mask, Len, Err) \ if (Char < 128) { \ @@ -580,8 +580,10 @@ uint BLI_str_utf8_as_unicode_and_size_safe(const char *__restrict p, size_t *__r return result; } -/* another variant that steps over the index, - * note, currently this also falls back to latin1 for text drawing. */ +/** + * Another variant that steps over the index. + * \note currently this also falls back to latin1 for text drawing. + */ uint BLI_str_utf8_as_unicode_step(const char *__restrict p, size_t *__restrict index) { int i, len; diff --git a/source/blender/blenlib/intern/task_iterator.c b/source/blender/blenlib/intern/task_iterator.c index f67671c65e0..0ff408ddb0a 100644 --- a/source/blender/blenlib/intern/task_iterator.c +++ b/source/blender/blenlib/intern/task_iterator.c @@ -80,7 +80,7 @@ BLI_INLINE void task_parallel_calc_chunk_size(const TaskParallelSettings *settin * else 3 if num_tasks < 48; * else 4 if num_tasks < 64; * etc. - * Note: If we wanted to keep the 'power of two' multiplier, we'd need something like: + * NOTE: If we wanted to keep the 'power of two' multiplier, we'd need something like: * 1 << max_ii(0, (int)(sizeof(int) * 8) - 1 - bitscan_reverse_i(num_tasks) - 3) */ const int num_tasks_factor = max_ii(1, num_tasks >> 3); |