From 1d8648b13a0667d338a4e60df004be7e41525968 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 28 Jun 2021 15:44:12 +1000 Subject: Cleanup: repeated terms in code comments & error messages --- source/blender/blenkernel/BKE_customdata.h | 2 +- source/blender/blenkernel/BKE_idtype.h | 4 ++-- source/blender/blenkernel/intern/action.c | 3 +-- source/blender/blenkernel/intern/action_mirror.c | 2 +- source/blender/blenkernel/intern/curve.c | 2 +- source/blender/blenkernel/intern/geometry_set_instances.cc | 2 +- source/blender/blenkernel/intern/gpencil_curve.c | 4 ++-- source/blender/blenkernel/intern/image.c | 6 ++++-- source/blender/blenkernel/intern/mesh_boolean_convert.cc | 2 +- source/blender/blenkernel/intern/mesh_mapping.c | 2 +- source/blender/blenkernel/intern/mesh_mirror.c | 6 +++--- source/blender/blenkernel/intern/object.c | 4 ++-- source/blender/blenkernel/intern/unit.c | 2 +- source/blender/blenkernel/intern/volume.cc | 2 +- source/blender/blenkernel/nla_private.h | 10 +++++----- 15 files changed, 27 insertions(+), 26 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h index d41b3f9f956..c4db8ee925e 100644 --- a/source/blender/blenkernel/BKE_customdata.h +++ b/source/blender/blenkernel/BKE_customdata.h @@ -539,7 +539,7 @@ enum { CDT_MIX_ADD = 17, CDT_MIX_SUB = 18, CDT_MIX_MUL = 19, - /* etc. etc. */ + /* Etc. */ }; typedef struct CustomDataTransferLayerMap { diff --git a/source/blender/blenkernel/BKE_idtype.h b/source/blender/blenkernel/BKE_idtype.h index 4578f1c3ca5..28171b2b363 100644 --- a/source/blender/blenkernel/BKE_idtype.h +++ b/source/blender/blenkernel/BKE_idtype.h @@ -82,8 +82,8 @@ typedef void (*IDTypeMakeLocalFunction)(struct Main *bmain, struct ID *id, const typedef void (*IDTypeForeachIDFunction)(struct ID *id, struct LibraryForeachIDData *data); typedef enum eIDTypeInfoCacheCallbackFlags { - /** Indicates to the callback that that cache may be stored in the .blend file, so its pointer - * should not be cleared at read-time. */ + /** Indicates to the callback that cache may be stored in the .blend file, + * so its pointer should not be cleared at read-time. */ IDTYPE_CACHE_CB_FLAGS_PERSISTENT = 1 << 0, } eIDTypeInfoCacheCallbackFlags; typedef void (*IDTypeForeachCacheFunctionCallback)(struct ID *id, diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index cf7023bc672..fdf3558abed 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -486,8 +486,7 @@ void action_groups_add_channel(bAction *act, bActionGroup *agrp, FCurve *fcurve) /* If grp is NULL, that means we fell through, and this F-Curve should be added as the new * first since group is (effectively) the first group. Thus, the existing first F-Curve becomes - * the second in the chain, etc. etc. - */ + * the second in the chain, etc. */ if (grp == NULL) { BLI_insertlinkbefore(&act->curves, act->curves.first, fcurve); } diff --git a/source/blender/blenkernel/intern/action_mirror.c b/source/blender/blenkernel/intern/action_mirror.c index c975d2bfb9c..69e0091444b 100644 --- a/source/blender/blenkernel/intern/action_mirror.c +++ b/source/blender/blenkernel/intern/action_mirror.c @@ -343,7 +343,7 @@ static void action_flip_pchan(Object *ob_arm, } \ ((void)0) - /* Write the values back the the F-curves. */ + /* Write the values back the F-curves. */ WRITE_ARRAY_FLT(loc); WRITE_ARRAY_FLT(eul); WRITE_ARRAY_FLT(quat); diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 462451fe72b..1849ca03b50 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -5135,7 +5135,7 @@ void BKE_curve_nurb_vert_active_set(Curve *cu, const Nurb *nu, const void *vert) } } -/* Get points to active active nurb and active vert for curve */ +/* Get points to the active nurb and active vert for curve. */ bool BKE_curve_nurb_vert_active_get(Curve *cu, Nurb **r_nu, void **r_vert) { Nurb *nu = NULL; diff --git a/source/blender/blenkernel/intern/geometry_set_instances.cc b/source/blender/blenkernel/intern/geometry_set_instances.cc index 8cf08d05d9d..6921b102b20 100644 --- a/source/blender/blenkernel/intern/geometry_set_instances.cc +++ b/source/blender/blenkernel/intern/geometry_set_instances.cc @@ -264,7 +264,7 @@ static bool instances_attribute_foreach_recursive(const GeometrySet &geometry_se } } - /* Now that this this geometry set is visited, increase the count and check with the limit. */ + /* Now that this geometry set is visited, increase the count and check with the limit. */ if (limit > 0 && count++ > limit) { return false; } diff --git a/source/blender/blenkernel/intern/gpencil_curve.c b/source/blender/blenkernel/intern/gpencil_curve.c index 74bb787eac3..344be7bc0f5 100644 --- a/source/blender/blenkernel/intern/gpencil_curve.c +++ b/source/blender/blenkernel/intern/gpencil_curve.c @@ -242,8 +242,8 @@ static int gpencil_get_stroke_material_fromcurve( float color_fill[4] = {0.0f, 0.0f, 0.0f, 0.0f}; /* If the curve has 2 materials, the first is considered as Fill and the second as Stroke. - * If the has only one material, if the name contains _stroke, the is used - * as stroke, else as fill. */ + * If the has only one material, if the name contains "_stroke", + * it's used as a stroke, otherwise as fill. */ if (ob_cu->totcol >= 2) { *do_stroke = true; *do_fill = true; diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index a2131d735a6..740c9b3864c 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -1056,9 +1056,11 @@ Image *BKE_image_add_generated(Main *bmain, return ima; } -/* Create an image image from ibuf. The refcount of ibuf is increased, +/** + * Create an image from ibuf. The refcount of ibuf is increased, * caller should take care to drop its reference by calling - * IMB_freeImBuf if needed. */ + * #IMB_freeImBuf if needed. + */ Image *BKE_image_add_from_imbuf(Main *bmain, ImBuf *ibuf, const char *name) { /* on save, type is changed to FILE in editsima.c */ diff --git a/source/blender/blenkernel/intern/mesh_boolean_convert.cc b/source/blender/blenkernel/intern/mesh_boolean_convert.cc index 5a8921132af..c162458ffb9 100644 --- a/source/blender/blenkernel/intern/mesh_boolean_convert.cc +++ b/source/blender/blenkernel/intern/mesh_boolean_convert.cc @@ -776,7 +776,7 @@ static Mesh *imesh_to_mesh(IMesh *im, MeshesToIMeshInfo &mim) /** * Do a mesh boolean operation directly on meshes (without going back and forth to BMesh). - * \param meshes: An array of of Mesh pointers. + * \param meshes: An array of Mesh pointers. * \param obmats: An array of pointers to the obmat matrices that transform local * coordinates to global ones. It is allowed for the pointers to be null, meaning the * transformation is the identity. diff --git a/source/blender/blenkernel/intern/mesh_mapping.c b/source/blender/blenkernel/intern/mesh_mapping.c index d4119f48193..c469a65449d 100644 --- a/source/blender/blenkernel/intern/mesh_mapping.c +++ b/source/blender/blenkernel/intern/mesh_mapping.c @@ -535,7 +535,7 @@ void BKE_mesh_edge_poly_map_create(MeshElemMap **r_map, * * This has the advantage that it can operate on any data-types. * - * \param totsource: The total number of elements the that \a final_origindex points to. + * \param totsource: The total number of elements that \a final_origindex points to. * \param totfinal: The size of \a final_origindex * \param final_origindex: The size of the final array. * diff --git a/source/blender/blenkernel/intern/mesh_mirror.c b/source/blender/blenkernel/intern/mesh_mirror.c index 3d30c218fba..9aeaa1ada52 100644 --- a/source/blender/blenkernel/intern/mesh_mirror.c +++ b/source/blender/blenkernel/intern/mesh_mirror.c @@ -70,9 +70,9 @@ Mesh *BKE_mesh_mirror_bisect_on_mirror_plane_for_modifier(MirrorModifierData *mm /* Define bisecting plane (aka mirror plane). */ float plane[4]; if (!do_bisect_flip_axis) { - /* That reversed condition is a tad weird, but for some reason that's how you keep - * the part of the mesh which is on the non-mirrored side when flip option is disabled, - * think that that is the expected behavior. */ + /* That reversed condition is a little weird, but for some reason that's how you keep + * the part of the mesh which is on the non-mirrored side when flip option is disabled. + * I think this is the expected behavior. */ negate_v3(plane_no); } plane_from_point_normal_v3(plane, plane_co, plane_no); diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index c5614a69744..a5e16172e75 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -4475,7 +4475,7 @@ Mesh *BKE_object_get_pre_modified_mesh(const Object *object) } /** - * Get a mesh which corresponds to very very original mesh from #Main. + * Get a mesh which corresponds to the very original mesh from #Main. * - For original objects it will be object->data. * - For evaluated objects it will be same mesh as corresponding original * object uses as data. @@ -5303,7 +5303,7 @@ KDTree_3d *BKE_object_as_kdtree(Object *ob, int *r_tot) tot = 0; tree = BLI_kdtree_3d_new(totvert); - /* we don't how how many verts from the DM we can use */ + /* We don't how many verts from the DM we can use. */ for (i = 0; i < totvert; i++) { if (index[i] != ORIGINDEX_NONE) { float co[3]; diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c index 3a9ce5ad932..290b880934e 100644 --- a/source/blender/blenkernel/intern/unit.c +++ b/source/blender/blenkernel/intern/unit.c @@ -744,7 +744,7 @@ static const char *unit_find_str(const char *str, const char *substr, bool case_ * * "1m1cm+2mm" - Original value. * "1*1#1*0.01#+2*0.001#" - Replace numbers. - * "1*1+1*0.01 +2*0.001 " - Add add signs if ( + - * / | & ~ < > ^ ! = % ) not found in between. + * "1*1+1*0.01 +2*0.001 " - Add plus signs if ( + - * / | & ~ < > ^ ! = % ) not found in between. */ /* Not too strict, (+ - * /) are most common. */ diff --git a/source/blender/blenkernel/intern/volume.cc b/source/blender/blenkernel/intern/volume.cc index 5fc55aad6a2..272ecc71833 100644 --- a/source/blender/blenkernel/intern/volume.cc +++ b/source/blender/blenkernel/intern/volume.cc @@ -1224,7 +1224,7 @@ const VolumeGrid *BKE_volume_grid_active_get_for_read(const Volume *volume) return BKE_volume_grid_get_for_read(volume, index); } -/* Tries to find a grid with the given name. Make sure that that the volume has been loaded. */ +/* Tries to find a grid with the given name. Make sure that the volume has been loaded. */ const VolumeGrid *BKE_volume_grid_find_for_read(const Volume *volume, const char *name) { int num_grids = BKE_volume_num_grids(volume); diff --git a/source/blender/blenkernel/nla_private.h b/source/blender/blenkernel/nla_private.h index 71b5a74ddf7..3e13ba602a4 100644 --- a/source/blender/blenkernel/nla_private.h +++ b/source/blender/blenkernel/nla_private.h @@ -39,13 +39,13 @@ struct AnimationEvalContext; typedef struct NlaEvalStrip { struct NlaEvalStrip *next, *prev; - NlaTrack *track; /* track that this strip belongs to */ - NlaStrip *strip; /* strip that's being used */ + NlaTrack *track; /* Track that this strip belongs to. */ + NlaStrip *strip; /* Strip that's being used. */ - short track_index; /* the index of the track within the list */ - short strip_mode; /* which end of the strip are we looking at */ + short track_index; /* The index of the track within the list. */ + short strip_mode; /* Which end of the strip are we looking at. */ - float strip_time; /* time at which which strip is being evaluated */ + float strip_time; /* Time at which this strip is being evaluated. */ } NlaEvalStrip; /* NlaEvalStrip->strip_mode */ -- cgit v1.2.3