From da3d1e9165f4d0ffcb04645aded3eea489fd6cdd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 7 Sep 2022 12:52:05 +1000 Subject: Cleanup: spelling in comments, correct doxy slashes, replace '/w' --- source/blender/blenkernel/BKE_gpencil_geom.h | 2 +- source/blender/blenkernel/intern/collection.c | 6 ++--- .../blenkernel/intern/image_partial_update.cc | 2 +- source/blender/blenkernel/intern/node.cc | 8 +++--- source/blender/blenkernel/intern/object.cc | 2 +- source/blender/blenkernel/intern/particle.c | 4 +-- source/blender/blenlib/BLI_pool.hh | 2 +- source/blender/editors/include/UI_interface.h | 2 +- source/blender/makesdna/intern/dna_genfile.c | 29 +++++++++++----------- source/blender/makesdna/intern/makesdna.c | 4 +-- source/blender/makesrna/intern/rna_rna.c | 2 +- source/blender/windowmanager/WM_types.h | 4 +-- 12 files changed, 33 insertions(+), 34 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/BKE_gpencil_geom.h b/source/blender/blenkernel/BKE_gpencil_geom.h index 67560470516..b9219814c08 100644 --- a/source/blender/blenkernel/BKE_gpencil_geom.h +++ b/source/blender/blenkernel/BKE_gpencil_geom.h @@ -401,7 +401,7 @@ void BKE_gpencil_stroke_set_random_color(struct bGPDstroke *gps); /** * Join two strokes using the shortest distance (reorder stroke if necessary). - * \param auto_flip: Flip the stroke if the join between two strokes is not end->start points. + * \param auto_flip: Flip the stroke if the join between two strokes is not end->start points. */ void BKE_gpencil_stroke_join(struct bGPDstroke *gps_a, struct bGPDstroke *gps_b, diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c index b3254794fa7..cbab1a2de6a 100644 --- a/source/blender/blenkernel/intern/collection.c +++ b/source/blender/blenkernel/intern/collection.c @@ -242,7 +242,7 @@ void BKE_collection_blend_read_data(BlendDataReader *reader, Collection *collect * * NOTE: Using do_version is not a solution here, since this code will be called before any * do_version takes place. Keeping it here also ensures future (or unknown existing) similar - * bugs won't go easily unoticed. */ + * bugs won't go easily unnoticed. */ CLOG_WARN(&LOG, "Fixing root node tree '%s' owned by '%s' missing EMBEDDED tag, please consider " "re-saving your (startup) file", @@ -483,8 +483,8 @@ void BKE_collection_add_from_collection(Main *bmain, is_instantiated = true; } else if (!is_instantiated && collection_find_child(collection, collection_dst)) { - /* If given collection_dst is already instantiated in scene, even if its 'model' src one is - * not, do not add it to master scene collection. */ + /* If given collection_dst is already instantiated in scene, even if its 'model' + * collection_src one is not, do not add it to master scene collection. */ is_instantiated = true; } } diff --git a/source/blender/blenkernel/intern/image_partial_update.cc b/source/blender/blenkernel/intern/image_partial_update.cc index c77ee77a5f2..6ffd323cc1e 100644 --- a/source/blender/blenkernel/intern/image_partial_update.cc +++ b/source/blender/blenkernel/intern/image_partial_update.cc @@ -413,7 +413,7 @@ struct PartialUpdateRegisterImpl { } /** - * /brief Check if data is available to construct the update tiles for the given + * \brief Check if data is available to construct the update tiles for the given * changeset_id. * * The update tiles can be created when changeset id is between diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc index f97e8df4387..a685eefcf4f 100644 --- a/source/blender/blenkernel/intern/node.cc +++ b/source/blender/blenkernel/intern/node.cc @@ -660,7 +660,7 @@ void ntreeBlendReadData(BlendDataReader *reader, ID *owner_id, bNodeTree *ntree) * * NOTE: Using do_version is not a solution here, since this code will be called before any * do_version takes place. Keeping it here also ensures future (or unknown existing) similar - * bugs won't go easily unoticed. */ + * bugs won't go easily unnoticed. */ CLOG_WARN(&LOG, "Fixing root node tree '%s' owned by '%s' missing EMBEDDED tag, please consider " "re-saving your (startup) file", @@ -913,9 +913,9 @@ void ntreeBlendReadLib(struct BlendLibReader *reader, struct bNodeTree *ntree) lib_link_node_sockets(reader, lib, &ntree->inputs); lib_link_node_sockets(reader, lib, &ntree->outputs); - /* Set node->typeinfo pointers. This is done in lib linking, after the + /* Set `node->typeinfo` pointers. This is done in lib linking, after the * first versioning that can change types still without functions that - * update the typeinfo pointers. Versioning after lib linking needs + * update the `typeinfo` pointers. Versioning after lib linking needs * these top be valid. */ ntreeSetTypes(nullptr, ntree); @@ -1072,7 +1072,7 @@ static void node_add_sockets_from_type(bNodeTree *ntree, bNode *node, bNodeType } /* NOTE: This function is called to initialize node data based on the type. - * The bNodeType may not be registered at creation time of the node, + * The #bNodeType may not be registered at creation time of the node, * so this can be delayed until the node type gets registered. */ static void node_init(const struct bContext *C, bNodeTree *ntree, bNode *node) diff --git a/source/blender/blenkernel/intern/object.cc b/source/blender/blenkernel/intern/object.cc index ec21d0b127b..ac33b11fcd2 100644 --- a/source/blender/blenkernel/intern/object.cc +++ b/source/blender/blenkernel/intern/object.cc @@ -2416,7 +2416,7 @@ ParticleSystem *BKE_object_copy_particlesystem(ParticleSystem *psys, const int f } /* XXX(@campbellbarton): from reading existing code this seems correct but intended usage of - * point-cache should /w cloth should be added in 'ParticleSystem'. */ + * point-cache should with cloth should be added in 'ParticleSystem'. */ if (psysn->clmd) { psysn->clmd->point_cache = psysn->pointcache; } diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 8db83031e17..f560b30b297 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -5418,7 +5418,7 @@ void BKE_particle_system_blend_read_lib(BlendLibReader *reader, if (psys->clmd) { /* XXX(@campbellbarton): from reading existing code this seems correct but intended usage - * of pointcache /w cloth should be added in 'ParticleSystem'. */ + * of point-cache with cloth should be added in #ParticleSystem. */ psys->clmd->point_cache = psys->pointcache; psys->clmd->ptcaches.first = psys->clmd->ptcaches.last = NULL; BLO_read_id_address(reader, id->lib, &psys->clmd->coll_parms->group); @@ -5426,7 +5426,7 @@ void BKE_particle_system_blend_read_lib(BlendLibReader *reader, } } else { - /* particle modifier must be removed before particle system */ + /* Particle modifier must be removed before particle system. */ ParticleSystemModifierData *psmd = psys_get_modifier(ob, psys); BKE_modifier_remove_from_list(ob, (ModifierData *)psmd); BKE_modifier_free((ModifierData *)psmd); diff --git a/source/blender/blenlib/BLI_pool.hh b/source/blender/blenlib/BLI_pool.hh index 7ed39fea195..8745c019db5 100644 --- a/source/blender/blenlib/BLI_pool.hh +++ b/source/blender/blenlib/BLI_pool.hh @@ -5,7 +5,7 @@ * * A `blender::Pool` allows fast allocation and deallocation of many elements of the same type. * - * It is compatible with types that are not moveable. + * It is compatible with types that are not movable. * * Freed elements memory will be reused by next allocations. * Elements are allocated in chunks to reduce memory fragmentation and avoid reallocation. diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 163ea7e9493..27e2f89f684 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -354,7 +354,7 @@ typedef enum { UI_BTYPE_LABEL = 20 << 9, UI_BTYPE_KEY_EVENT = 24 << 9, UI_BTYPE_HSVCUBE = 26 << 9, - /** menu (often used in headers), **_MENU /w different draw-type */ + /** Menu (often used in headers), `*_MENU` with different draw-type. */ UI_BTYPE_PULLDOWN = 27 << 9, UI_BTYPE_ROUNDBOX = 28 << 9, UI_BTYPE_COLORBAND = 30 << 9, diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index f43cf02c0b8..1b424756b0a 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -491,15 +491,15 @@ static bool init_structDNA(SDNA *sdna, bool do_endian_swap, const char **r_error return false; } - /* finally pointer_size: use struct ListBase to test it, never change the size of it! */ + /* finally pointer_size: use struct #ListBase to test it, never change the size of it! */ SDNA_Struct *struct_info = sdna->structs[nr]; - /* weird; i have no memory of that... I think I used sizeof(void *) before... (ton) */ + /* Weird; I have no memory of that... I think I used `sizeof(void *)` before... (ton). */ sdna->pointer_size = sdna->types_size[struct_info->type] / 2; if (struct_info->members_len != 2 || (!ELEM(sdna->pointer_size, 4, 8))) { - *r_error_message = "ListBase struct error! Needs it to calculate pointerize."; - /* well, at least sizeof(ListBase) is error proof! (ton) */ + *r_error_message = "ListBase struct error! Needs it to calculate pointer-size."; + /* Well, at least `sizeof(ListBase)` is error proof! (ton). */ return false; } } @@ -676,9 +676,8 @@ const char *DNA_struct_get_compareflags(const SDNA *oldsdna, const SDNA *newsdna BLI_assert(compare_flags[a] != SDNA_CMP_UNKNOWN); } - /* first struct in util.h is struct Link, this is skipped in compare_flags (als # 0). - * was a bug, and this way dirty patched! Solve this later.... - */ + /* First struct in `util.h` is struct Link, this is skipped in compare_flags (als # 0). + * was a bug, and this way dirty patched! Solve this later. */ compare_flags[0] = SDNA_CMP_EQUAL; /* This code can be enabled to see which structs have changed. */ @@ -852,7 +851,7 @@ static void cast_pointer_64_to_32(const int array_len, } /** - * Equality test on name and oname excluding any array-size suffix. + * Equality test on name and `oname` excluding any array-size suffix. */ static bool elem_streq(const char *name, const char *oname) { @@ -879,7 +878,7 @@ static bool elem_streq(const char *name, const char *oname) * * \param type: Current field type name. * \param name: Current field name. - * \param old: Pointer to struct information in sdna. + * \param old: Pointer to struct information in `sdna`. * \return true when existing, false otherwise.. */ static bool elem_exists_impl( @@ -1042,7 +1041,7 @@ void DNA_struct_switch_endian(const SDNA *sdna, int struct_nr, char *data) } case SDNA_TYPE_INT: case SDNA_TYPE_FLOAT: { - /* NOTE: intentionally ignore long/ulong, because these could be 4 or 8 bytes. + /* NOTE: intentionally ignore `long/ulong`, because these could be 4 or 8 bytes. * Fortunately, we only use these types for runtime variables and only once for a * struct type that is no longer used. */ BLI_endian_switch_int32_array((int32_t *)member_data, member_array_length); @@ -1061,7 +1060,7 @@ void DNA_struct_switch_endian(const SDNA *sdna, int struct_nr, char *data) break; } case STRUCT_MEMBER_CATEGORY_POINTER: { - /* See readfile.c (#bh4_from_bh8 swap endian argument), + /* See `readfile.c` (#bh4_from_bh8 swap endian argument), * this is only done when reducing the size of a pointer from 4 to 8. */ if (sizeof(void *) < 8) { if (sdna->pointer_size == 8) { @@ -1304,7 +1303,7 @@ static void init_reconstruct_step_for_member(const SDNA *oldsdna, enum eSDNA_StructCompare compare_flag = compare_flags[old_struct_nr]; BLI_assert(compare_flag != SDNA_CMP_REMOVED); if (compare_flag == SDNA_CMP_EQUAL) { - /* The old and new members are identical, just do a memcpy. */ + /* The old and new members are identical, just do a #memcpy. */ r_step->type = RECONSTRUCT_STEP_MEMCPY; r_step->data.memcpy.new_offset = new_member_offset; r_step->data.memcpy.old_offset = old_member_offset; @@ -1333,7 +1332,7 @@ static void init_reconstruct_step_for_member(const SDNA *oldsdna, } case STRUCT_MEMBER_CATEGORY_PRIMITIVE: { if (STREQ(new_type_name, old_type_name)) { - /* Primitives with the same name cannot be different, so just do a memcpy. */ + /* Primitives with the same name cannot be different, so just do a #memcpy. */ r_step->type = RECONSTRUCT_STEP_MEMCPY; r_step->data.memcpy.new_offset = new_member_offset; r_step->data.memcpy.old_offset = old_member_offset; @@ -1352,7 +1351,7 @@ static void init_reconstruct_step_for_member(const SDNA *oldsdna, } case STRUCT_MEMBER_CATEGORY_POINTER: { if (newsdna->pointer_size == oldsdna->pointer_size) { - /* The pointer size is the same, so just do a memcpy. */ + /* The pointer size is the same, so just do a #memcpy. */ r_step->type = RECONSTRUCT_STEP_MEMCPY; r_step->data.memcpy.new_offset = new_member_offset; r_step->data.memcpy.old_offset = old_member_offset; @@ -1386,7 +1385,7 @@ static void print_reconstruct_step(ReconstructStep *step, const SDNA *oldsdna, c { switch (step->type) { case RECONSTRUCT_STEP_INIT_ZERO: { - printf("init zero"); + printf("initialize zero"); break; } case RECONSTRUCT_STEP_MEMCPY: { diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 36abe970b31..7b893078b22 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -393,10 +393,10 @@ static int add_name(const char *str) if (!isfuncptr) { /* multidimensional array pointer case */ if (str[j] == 0) { - DEBUG_PRINTF(3, "offsetting for multidim array pointer\n"); + DEBUG_PRINTF(3, "offsetting for multi-dimensional array pointer\n"); } else { - printf("Error during tokening multidim array pointer\n"); + printf("Error during tokenizing multi-dimensional array pointer\n"); } } else if (str[j] == 0) { diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index fd1879b3df7..57f75fe892c 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -1577,7 +1577,7 @@ static int rna_property_override_diff_propptr(Main *bmain, RNA_property_##_typename##_set((_ptr), (_prop), (_value))) /** - * /return `0` is matching, `-1` if `prop_a < prop_b`, `1` if `prop_a > prop_b`. Note that for + * \return `0` is matching, `-1` if `prop_a < prop_b`, `1` if `prop_a > prop_b`. Note that for * unquantifiable properties (e.g. pointers or collections), return value should be interpreted as * a boolean (false == matching, true == not matching). */ diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index 6526b7bec0e..ba1d8d3ccb7 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -416,8 +416,8 @@ typedef struct wmNotifier { #define ND_POINTCACHE (28 << 16) #define ND_PARENT (29 << 16) #define ND_LOD (30 << 16) -#define ND_DRAW_RENDER_VIEWPORT \ - (31 << 16) /* for camera & sequencer viewport update, also /w NC_SCENE */ +/** For camera & sequencer viewport update, also with #NC_SCENE. */ +#define ND_DRAW_RENDER_VIEWPORT (31 << 16) #define ND_SHADERFX (32 << 16) /* For updating motion paths in 3dview. */ #define ND_DRAW_ANIMVIZ (33 << 16) -- cgit v1.2.3