From 724755879ec77fb68063cb7d3b8c2570b2f092ca Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 31 Jul 2023 10:15:30 +1000 Subject: [PATCH] Cleanup: spelling in comments, use doxygen doc-strings --- .../blender/blenkernel/BKE_blender_version.h | 14 +++++++------ source/blender/blenkernel/intern/anim_sys.cc | 3 ++- source/blender/blenkernel/intern/blendfile.cc | 3 ++- source/blender/blenloader/intern/readfile.cc | 13 +++++++----- .../blenloader/intern/versioning_legacy.cc | 14 ++++++------- source/blender/bmesh/intern/bmesh_core.cc | 4 ++-- source/blender/bmesh/intern/bmesh_walkers.cc | 2 +- source/blender/bmesh/operators/bmo_edgenet.cc | 2 +- source/blender/bmesh/tools/bmesh_wireframe.cc | 2 +- .../depsgraph/intern/depsgraph_query.cc | 2 +- .../draw/engines/eevee/eevee_cryptomatte.cc | 6 +++--- .../draw/engines/eevee/eevee_engine.cc | 2 +- .../draw/engines/eevee/eevee_lightprobes.cc | 2 +- .../engines/eevee/eevee_shadows_cascade.cc | 2 +- .../draw/engines/eevee/eevee_shadows_cube.cc | 2 +- .../draw/engines/overlay/overlay_armature.cc | 7 ++++--- .../workbench/workbench_effect_dof_c.cc | 2 +- source/blender/draw/intern/draw_manager_c.cc | 4 ++-- .../editors/gpencil_legacy/gpencil_paint.cc | 2 +- .../editors/interface/interface_ops.cc | 2 +- .../editors/interface/views/abstract_view.cc | 2 +- source/blender/gpu/intern/gpu_codegen.cc | 6 +++--- source/blender/imbuf/IMB_imbuf.h | 2 +- .../blender/makesdna/DNA_constraint_types.h | 3 ++- source/blender/makesrna/intern/rna_rna.cc | 21 ++++++++++++------- .../modifiers/intern/MOD_laplaciandeform.cc | 2 +- .../modifiers/intern/MOD_solidify_extrude.cc | 2 +- source/blender/render/intern/texture_image.cc | 4 ++-- .../blender/windowmanager/intern/wm_files.cc | 2 +- .../message_bus/wm_message_bus.h | 2 +- source/blender/windowmanager/wm_files.h | 2 +- tools/check_source/check_spelling_c_config.py | 2 ++ 32 files changed, 78 insertions(+), 62 deletions(-) diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h index c0a63e9f901..ad8bbdd6c95 100644 --- a/source/blender/blenkernel/BKE_blender_version.h +++ b/source/blender/blenkernel/BKE_blender_version.h @@ -20,9 +20,9 @@ extern "C" { * \note Use #STRINGIFY() rather than defining with quotes. */ -/* Blender major and minor version. */ +/** Blender major and minor version. */ #define BLENDER_VERSION 400 -/* Blender patch version for bug-fix releases. */ +/** Blender patch version for bug-fix releases. */ #define BLENDER_VERSION_PATCH 0 /** Blender release cycle stage: alpha/beta/rc/release. */ #define BLENDER_VERSION_CYCLE alpha @@ -42,17 +42,19 @@ extern "C" { /** User readable version string. */ const char *BKE_blender_version_string(void); -/* Returns true when version cycle is alpha, otherwise (beta, rc) returns false. */ +/** Returns true when version cycle is alpha, otherwise (beta, rc) returns false. */ bool BKE_blender_version_is_alpha(void); -/** Fill in given string buffer with user-readable formated file version and subversion (if +/** + * Fill in given string buffer with user-readable formatted file version and subversion (if * provided). * - * \param str_buff a char buffer where the formated string is written, minimal recommended size is + * \param str_buff a char buffer where the formatted string is written, minimal recommended size is * 8, or 16 if subversion is provided. * * \param file_subversion the file subversion, if given value < 0, it is ignored, and only the - * `file_version` is used. */ + * `file_version` is used. + */ void BKE_blender_version_blendfile_string_from_values(char *str_buff, const size_t str_buff_len, const short file_version, diff --git a/source/blender/blenkernel/intern/anim_sys.cc b/source/blender/blenkernel/intern/anim_sys.cc index 0bc9f5430e4..3fd1f9589c1 100644 --- a/source/blender/blenkernel/intern/anim_sys.cc +++ b/source/blender/blenkernel/intern/anim_sys.cc @@ -2792,7 +2792,8 @@ static void nlastrip_evaluate_transition(const int evaluation_mode, anim_eval_context, flush_to_original); - /** Replace \a snapshot2 nullptr channels with base or default values so all channels blend. + /** + * Replace \a snapshot2 nullptr channels with base or default values so all channels blend. */ nlasnapshot_ensure_channels(channels, &snapshot2); /** Mark all \a snapshot2 channel's values to blend. */ diff --git a/source/blender/blenkernel/intern/blendfile.cc b/source/blender/blenkernel/intern/blendfile.cc index 148cb3ae78a..79b8b8f6bc5 100644 --- a/source/blender/blenkernel/intern/blendfile.cc +++ b/source/blender/blenkernel/intern/blendfile.cc @@ -548,7 +548,8 @@ static int reuse_bmain_data_invalid_local_usages_fix_cb(LibraryIDLinkCallbackDat return IDWALK_RET_NOP; } -/** Detect and fix invalid usages of locale IDs by linked ones (or as reference of liboverrides). +/** + * Detect and fix invalid usages of locale IDs by linked ones (or as reference of liboverrides). */ static void reuse_bmain_data_invalid_local_usages_fix(ReuseOldBMainData *reuse_data) { diff --git a/source/blender/blenloader/intern/readfile.cc b/source/blender/blenloader/intern/readfile.cc index 67929c2514d..8a361abeef4 100644 --- a/source/blender/blenloader/intern/readfile.cc +++ b/source/blender/blenloader/intern/readfile.cc @@ -570,7 +570,7 @@ static Main *blo_find_main(FileData *fd, const char *filepath, const char *relab void blo_readfile_invalidate(FileData *fd, Main *bmain, const char *message) { - /* Tag given bmain, and 'root 'local' main one (in case given one is a library one) as invalid. + /* Tag given `bmain`, and 'root 'local' main one (in case given one is a library one) as invalid. */ bmain->is_read_invalid = true; for (; bmain->prev != nullptr; bmain = bmain->prev) @@ -727,7 +727,7 @@ static BHeadN *get_bhead(FileData *fd) bh4_from_bh8(&bhead, &bhead8, (fd->flags & FD_FLAGS_SWITCH_ENDIAN) != 0); } else { - /* MIN2 is only to quiet '-Warray-bounds' compiler warning. */ + /* MIN2 is only to quiet `-Warray-bounds` compiler warning. */ BLI_assert(sizeof(bhead) == sizeof(bhead8)); memcpy(&bhead, &bhead8, MIN2(sizeof(bhead), sizeof(bhead8))); } @@ -1081,8 +1081,11 @@ static FileData *filedata_new(BlendFileReadReport *reports) return fd; } -/** Check if minversion of the file is older than current Blender, return false if it is not. - * Should only be called after #read_file_dna was successfuly executed. */ +/** + * Check if #FileGlobal::minversion of the file is older than current Blender, + * return false if it is not. + * Should only be called after #read_file_dna was successfully executed. + */ static bool is_minversion_older_than_blender(FileData *fd, ReportList *reports) { BLI_assert(fd->filesdna != nullptr); @@ -1188,7 +1191,7 @@ static FileData *blo_filedata_from_file_descriptor(const char *filepath, /* Try opening the file with memory-mapped IO. */ file = BLI_filereader_new_mmap(filedes); if (file == nullptr) { - /* mmap failed, so just keep using rawfile. */ + /* `mmap` failed, so just keep using `rawfile`. */ file = rawfile; rawfile = nullptr; } diff --git a/source/blender/blenloader/intern/versioning_legacy.cc b/source/blender/blenloader/intern/versioning_legacy.cc index 92ceab1c4f0..b669b78b744 100644 --- a/source/blender/blenloader/intern/versioning_legacy.cc +++ b/source/blender/blenloader/intern/versioning_legacy.cc @@ -792,11 +792,10 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) sound = static_cast(sound->id.next); } - /* me->subdiv changed to reflect the actual reparametization - * better, and smeshes were removed - if it was a smesh make - * it a subsurf, and reset the subdiv level because subsurf - * takes a lot more work to calculate. - */ + /* `me->subdiv` changed to reflect the actual reparametization + * better, and S-meshes were removed - if it was a S-mesh make + * it a subsurf, and reset the subdivision level because subsurf + * takes a lot more work to calculate. */ for (me = static_cast(bmain->meshes.first); me; me = static_cast(me->id.next)) { enum { @@ -1192,9 +1191,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) wrld = static_cast(wrld->id.next); } - /* new variable blockscale, for panels in any area, do again because new - * areas didn't initialize it to 0.7 yet - */ + /* New variable block-scale, for panels in any area, do again because new + * areas didn't initialize it to 0.7 yet. */ for (screen = static_cast(bmain->screens.first); screen; screen = static_cast(screen->id.next)) { diff --git a/source/blender/bmesh/intern/bmesh_core.cc b/source/blender/bmesh/intern/bmesh_core.cc index dc1909be79f..5f30810cb69 100644 --- a/source/blender/bmesh/intern/bmesh_core.cc +++ b/source/blender/bmesh/intern/bmesh_core.cc @@ -1406,9 +1406,9 @@ BMFace *bmesh_kernel_split_face_make_edge(BMesh *bm, } while ((l_iter = l_iter->next) != l_first); if (first_loop_f1) { - /* original first loop was in f1, find a suitable first loop for f2 + /* Original first loop was in f1, find a suitable first loop for f2 * which is as similar as possible to f1. the order matters for tools - * such as duplifaces. */ + * such as dupli-faces. */ if (f->l_first->prev == l_f1) { f2->l_first = l_f2->prev; } diff --git a/source/blender/bmesh/intern/bmesh_walkers.cc b/source/blender/bmesh/intern/bmesh_walkers.cc index 1fb2f82ecf0..7a228db76d1 100644 --- a/source/blender/bmesh/intern/bmesh_walkers.cc +++ b/source/blender/bmesh/intern/bmesh_walkers.cc @@ -28,7 +28,7 @@ */ #include -#include /* for memcpy */ +#include /* For `memcpy`. */ #include "BLI_listbase.h" #include "BLI_utildefines.h" diff --git a/source/blender/bmesh/operators/bmo_edgenet.cc b/source/blender/bmesh/operators/bmo_edgenet.cc index 41f4aa00c11..7d28dcf44b2 100644 --- a/source/blender/bmesh/operators/bmo_edgenet.cc +++ b/source/blender/bmesh/operators/bmo_edgenet.cc @@ -228,7 +228,7 @@ void bmo_edgenet_prepare_exec(BMesh *bm, BMOperator *op) normal_tri_v3(dvec2, v1->co, v4->co, v3->co); #else { - /* save some CPU cycles and skip the sqrt and 1 subtraction */ + /* Save some CPU cycles and skip the `sqrt` and 1 subtraction. */ float a1[3], a2[3], a3[3]; sub_v3_v3v3(a1, v1->co, v2->co); sub_v3_v3v3(a2, v1->co, v4->co); diff --git a/source/blender/bmesh/tools/bmesh_wireframe.cc b/source/blender/bmesh/tools/bmesh_wireframe.cc index 949668c9c50..b4ab872052f 100644 --- a/source/blender/bmesh/tools/bmesh_wireframe.cc +++ b/source/blender/bmesh/tools/bmesh_wireframe.cc @@ -191,7 +191,7 @@ void BM_mesh_wireframe(BMesh *bm, MEM_mallocN(sizeof(float) * totvert_orig, __func__) : nullptr); - /* may over-alloc if not all faces have wire */ + /* May over-allocate if not all faces have wire. */ BMVert **verts_loop; int verts_loop_tot = 0; diff --git a/source/blender/depsgraph/intern/depsgraph_query.cc b/source/blender/depsgraph/intern/depsgraph_query.cc index 626a7df4724..a47adfae0e7 100644 --- a/source/blender/depsgraph/intern/depsgraph_query.cc +++ b/source/blender/depsgraph/intern/depsgraph_query.cc @@ -10,7 +10,7 @@ #include "MEM_guardedalloc.h" -#include /* XXX: memcpy */ +#include /* XXX: `memcpy`. */ #include "BLI_listbase.h" #include "BLI_utildefines.h" diff --git a/source/blender/draw/engines/eevee/eevee_cryptomatte.cc b/source/blender/draw/engines/eevee/eevee_cryptomatte.cc index ad73b4a9876..b0976144cd0 100644 --- a/source/blender/draw/engines/eevee/eevee_cryptomatte.cc +++ b/source/blender/draw/engines/eevee/eevee_cryptomatte.cc @@ -355,13 +355,13 @@ static void eevee_cryptomatte_download_buffer(EEVEE_Data *vedata, GPUFrameBuffer GPU_DATA_FLOAT, download_buffer); - /* Integrate download buffer into the accum buffer. + /* Integrate download buffer into the accumulation buffer. * The download buffer contains up to 3 floats per pixel (one float per cryptomatte layer. * * NOTE: here we deviate from the cryptomatte standard. During integration the standard always * sort the samples by its weight to make sure that samples with the lowest weight * are discarded first. In our case the weight of each sample is always 1 as we don't have - * subsamples and apply the coverage during the post processing. When there is no room for new + * sub-samples and apply the coverage during the post processing. When there is no room for new * samples the new samples has a weight of 1 and will always be discarded. */ int download_pixel_index = 0; int accum_pixel_index = 0; @@ -424,7 +424,7 @@ void EEVEE_cryptomatte_output_accumulate(EEVEE_ViewLayerData * /*sldata*/, EEVEE void EEVEE_cryptomatte_update_passes(RenderEngine *engine, Scene *scene, ViewLayer *view_layer) { - /* NOTE: Name channels lowercase rgba so that compression rules check in OpenEXR DWA code uses + /* NOTE: Name channels lowercase RGBA so that compression rules check in OpenEXR DWA code uses * lossless compression. Reportedly this naming is the only one which works good from the * interoperability point of view. Using XYZW naming is not portable. */ diff --git a/source/blender/draw/engines/eevee/eevee_engine.cc b/source/blender/draw/engines/eevee/eevee_engine.cc index dc6dfcc1449..cca83cbee83 100644 --- a/source/blender/draw/engines/eevee/eevee_engine.cc +++ b/source/blender/draw/engines/eevee/eevee_engine.cc @@ -458,7 +458,7 @@ void eevee_id_update(void *vedata, ID *id) static void eevee_render_reset_passes(EEVEE_Data *vedata) { - /* Reset passlist. This is safe as they are stored into managed memory chunks. */ + /* Reset pass-list. This is safe as they are stored into managed memory chunks. */ memset(vedata->psl, 0, sizeof(*vedata->psl)); } diff --git a/source/blender/draw/engines/eevee/eevee_lightprobes.cc b/source/blender/draw/engines/eevee/eevee_lightprobes.cc index e5e059f6c65..a72c0f71495 100644 --- a/source/blender/draw/engines/eevee/eevee_lightprobes.cc +++ b/source/blender/draw/engines/eevee/eevee_lightprobes.cc @@ -1099,7 +1099,7 @@ void EEVEE_lightbake_filter_diffuse(EEVEE_ViewLayerData *sldata, int y = size[1] * (grid_offset / cell_per_row); #ifndef IRRADIANCE_SH_L2 - /* Tweaking parameters to balance perf. vs precision */ + /* Tweaking parameters to balance performance vs precision. */ const float bias = 0.0f; pinfo->lodfactor = bias + 0.5f * log(square_f(target_size) / pinfo->samples_len) / log(2); pinfo->lod_rt_max = log2_floor_u(target_size) - 2.0f; diff --git a/source/blender/draw/engines/eevee/eevee_shadows_cascade.cc b/source/blender/draw/engines/eevee/eevee_shadows_cascade.cc index 3f045815bf8..ced23d26721 100644 --- a/source/blender/draw/engines/eevee/eevee_shadows_cascade.cc +++ b/source/blender/draw/engines/eevee/eevee_shadows_cascade.cc @@ -154,7 +154,7 @@ static void eevee_shadow_cascade_setup(EEVEE_LightsInfo *linfo, copy_v3_v3(csm_data->shadow_vec, csm_render->viewinv[2]); - /* Compute near and far value based on all shadow casters cumulated AABBs. */ + /* Compute near and far value based on all shadow casters accumulated AABBs. */ float sh_near = -1.0e30f, sh_far = 1.0e30f; BoundBox shcaster_bounds; BKE_boundbox_init_from_minmax( diff --git a/source/blender/draw/engines/eevee/eevee_shadows_cube.cc b/source/blender/draw/engines/eevee/eevee_shadows_cube.cc index c9255372ebe..404b1fe9a5d 100644 --- a/source/blender/draw/engines/eevee/eevee_shadows_cube.cc +++ b/source/blender/draw/engines/eevee/eevee_shadows_cube.cc @@ -150,7 +150,7 @@ static void eevee_ensure_cube_views( } } -/* Does a spot angle fits a single cubeface. */ +/* Does a spot angle fits a single cube-face. */ static bool spot_angle_fit_single_face(const EEVEE_Light *evli) { /* alpha = spot/cone half angle. */ diff --git a/source/blender/draw/engines/overlay/overlay_armature.cc b/source/blender/draw/engines/overlay/overlay_armature.cc index a3d13765735..ee2bae72105 100644 --- a/source/blender/draw/engines/overlay/overlay_armature.cc +++ b/source/blender/draw/engines/overlay/overlay_armature.cc @@ -2012,10 +2012,10 @@ static bool pchan_culling_test_with_radius_scale(const DRWView *view, /** \name Bone Drawing Strategies * * Bone drawing uses a strategy pattern for the different armature drawing modes. - * * \{ */ -/** Bone drawing strategy for unknown draw types. +/** + * Bone drawing strategy for unknown draw types. * This doesn't do anything, except call the default matrix update function. */ class ArmatureBoneDrawStrategyEmpty : public ArmatureBoneDrawStrategy { @@ -2491,7 +2491,8 @@ class ArmatureBoneDrawStrategyWire : public ArmatureBoneDrawStrategy { }; namespace { -/** Armature drawing strategies. +/** + * Armature drawing strategies. * * Declared statically here because they cost almost no memory (no fields in any * of the structs, so just the virtual function table), and this makes it very diff --git a/source/blender/draw/engines/workbench/workbench_effect_dof_c.cc b/source/blender/draw/engines/workbench/workbench_effect_dof_c.cc index 1625d9fe3da..42ceb5847aa 100644 --- a/source/blender/draw/engines/workbench/workbench_effect_dof_c.cc +++ b/source/blender/draw/engines/workbench/workbench_effect_dof_c.cc @@ -143,7 +143,7 @@ void workbench_dof_engine_init(WORKBENCH_Data *vedata) const float *full_size = DRW_viewport_size_get(); const int size[2] = {max_ii(1, int(full_size[0]) / 2), max_ii(1, int(full_size[1]) / 2)}; #if 0 /* TODO(fclem): finish COC min_max optimization. */ - /* NOTE: We Ceil here in order to not miss any edge texel if using a NPO2 texture. */ + /* NOTE: We `ceil` here in order to not miss any edge texel if using a NPO2 texture. */ int shrink_h_size[2] = {ceilf(size[0] / 8.0f), size[1]}; int shrink_w_size[2] = {shrink_h_size[0], ceilf(size[1] / 8.0f)}; #endif diff --git a/source/blender/draw/intern/draw_manager_c.cc b/source/blender/draw/intern/draw_manager_c.cc index bcd83810f59..f716eeb8c65 100644 --- a/source/blender/draw/intern/draw_manager_c.cc +++ b/source/blender/draw/intern/draw_manager_c.cc @@ -1536,7 +1536,7 @@ void DRW_draw_callbacks_post_scene() /* XXX: Or should we use a proper draw/overlay engine for this case? */ if (((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) && (do_annotations)) { GPU_depth_test(GPU_DEPTH_NONE); - /* XXX: as scene->gpd is not copied for COW yet */ + /* XXX: as `scene->gpd` is not copied for COW yet */ ED_annotation_draw_view3d(DEG_get_input_scene(depsgraph), depsgraph, v3d, region, false); } @@ -1559,7 +1559,7 @@ void DRW_draw_callbacks_post_scene() else { if (v3d && ((v3d->flag2 & V3D_SHOW_ANNOTATION) != 0)) { GPU_depth_test(GPU_DEPTH_NONE); - /* XXX: as scene->gpd is not copied for COW yet */ + /* XXX: as `scene->gpd` is not copied for COW yet */ ED_annotation_draw_view3d(DEG_get_input_scene(depsgraph), depsgraph, v3d, region, true); GPU_depth_test(GPU_DEPTH_LESS_EQUAL); } diff --git a/source/blender/editors/gpencil_legacy/gpencil_paint.cc b/source/blender/editors/gpencil_legacy/gpencil_paint.cc index 350f779056b..45c832e210c 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_paint.cc +++ b/source/blender/editors/gpencil_legacy/gpencil_paint.cc @@ -3045,7 +3045,7 @@ static void gpencil_draw_apply_event(bContext *C, /* get stroke angle for grids */ if (ELEM(guide->type, GP_GUIDE_ISO)) { p->guide.stroke_angle = atan2f(pt[1], pt[0]); - /* determine iso angle, less weight is given for vertical strokes */ + /* Determine ISO angle, less weight is given for vertical strokes. */ if (((p->guide.stroke_angle >= 0.0f) && (p->guide.stroke_angle < DEG2RAD(75))) || (p->guide.stroke_angle < DEG2RAD(-105))) { diff --git a/source/blender/editors/interface/interface_ops.cc b/source/blender/editors/interface/interface_ops.cc index 90f61fe5fb5..731d5d27d9a 100644 --- a/source/blender/editors/interface/interface_ops.cc +++ b/source/blender/editors/interface/interface_ops.cc @@ -1853,7 +1853,7 @@ static void edittranslation_find_po_file(const char *root, return; } - /* Now try without the second iso code part (_ES in es_ES). */ + /* Now try without the second ISO code part (`_ES` in `es_ES`). */ { const char *tc = nullptr; size_t szt = 0; diff --git a/source/blender/editors/interface/views/abstract_view.cc b/source/blender/editors/interface/views/abstract_view.cc index 8319a520f1f..dcaa3a389e7 100644 --- a/source/blender/editors/interface/views/abstract_view.cc +++ b/source/blender/editors/interface/views/abstract_view.cc @@ -63,7 +63,7 @@ void AbstractView::update_from_old(uiBlock &new_block) /** \} */ /* ---------------------------------------------------------------------- */ -/** \name State Managment +/** \name State Management * \{ */ void AbstractView::change_state_delayed() diff --git a/source/blender/gpu/intern/gpu_codegen.cc b/source/blender/gpu/intern/gpu_codegen.cc index 3ead4b8a5d4..07e863b8cb9 100644 --- a/source/blender/gpu/intern/gpu_codegen.cc +++ b/source/blender/gpu/intern/gpu_codegen.cc @@ -230,12 +230,12 @@ static std::ostream &operator<<(std::ostream &stream, const GPUConstant *input) { stream << input->type << "("; for (int i = 0; i < input->type; i++) { - char formated_float[32]; + char formatted_float[32]; /* Use uint representation to allow exact same bit pattern even if NaN. This is because we can * pass UINTs as floats for constants. */ const uint32_t *uint_vec = reinterpret_cast(input->vec); - SNPRINTF(formated_float, "uintBitsToFloat(%uu)", uint_vec[i]); - stream << formated_float; + SNPRINTF(formatted_float, "uintBitsToFloat(%uu)", uint_vec[i]); + stream << formatted_float; if (i < input->type - 1) { stream << ", "; } diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h index 49128a6ec08..f415adf1751 100644 --- a/source/blender/imbuf/IMB_imbuf.h +++ b/source/blender/imbuf/IMB_imbuf.h @@ -645,7 +645,7 @@ void IMB_buffer_float_premultiply(float *buf, int width, int height); /** * Change the ordering of the color bytes pointed to by rect from - * rgba to abgr. size * 4 color bytes are reordered. + * RGBA to ABGR. size * 4 color bytes are reordered. * * \attention Defined in imageprocess.c * diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index 3ce77430698..a1626ae7ab3 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -1111,7 +1111,8 @@ typedef enum eChildOf_Flags { CHILDOF_SET_INVERSE = (1 << 9), } eChildOf_Flags; -/** Pivot Constraint +/** + * Pivot Constraint * * Restrictions for Pivot Constraint axis to consider for enabling constraint. */ diff --git a/source/blender/makesrna/intern/rna_rna.cc b/source/blender/makesrna/intern/rna_rna.cc index 4fe7d544eda..35ef5e4c653 100644 --- a/source/blender/makesrna/intern/rna_rna.cc +++ b/source/blender/makesrna/intern/rna_rna.cc @@ -1237,8 +1237,10 @@ static int rna_BlenderRNA_structs_lookup_string(PointerRNA *ptr, /* Default override (and compare) callbacks. */ -/* Ensures it makes sense to go inside the pointers to compare their content - * (if they are IDs, or have different names or RNA type, then this would be meaningless). */ +/** + * Ensures it makes sense to go inside the pointers to compare their content + * (if they are IDs, or have different names or RNA type, then this would be meaningless). + */ struct RNACompareOverrideDiffPropPtrContext { /** General RNA diffing context. */ RNAPropertyOverrideDiffContext &rnadiff_ctx; @@ -1250,11 +1252,15 @@ struct RNACompareOverrideDiffPropPtrContext { PointerRNA propptr_b = {0}; PropertyType property_type = PROP_BOOLEAN; - /** Indicates the RNA structure cintaining that RNA pointer does not own the data it points to. - * See also #PROP_PTR_NO_OWNERSHIP documentation. */ + /** + * Indicates the RNA structure containing that RNA pointer does not own the data it points to. + * See also #PROP_PTR_NO_OWNERSHIP documentation. + */ bool no_ownership = false; - /** RNA collection items: do not attempt to get the item property name (i.e. only uses its - * index). */ + /** + * RNA collection items: do not attempt to get the item property name + * (i.e. only uses its index). + */ bool no_prop_name = false; /** RNA collection items: forcefully get an item property name, even if one of the items is * null/doesn't have one. Mutually exclusive with `no_prop_name`. */ @@ -1269,7 +1275,8 @@ struct RNACompareOverrideDiffPropPtrContext { int rna_itemindex_a = -1; int rna_itemindex_b = -1; - /** Status info, usually set by a call to #rna_property_override_diff_propptr_validate_diffing. + /** + * Status info, usually set by a call to #rna_property_override_diff_propptr_validate_diffing. */ /** Indicate whether the two given RNA pointers can be considered 'matching data', i.e. the * pointers themselves should not be compared, but rather the content of the RNA structs they diff --git a/source/blender/modifiers/intern/MOD_laplaciandeform.cc b/source/blender/modifiers/intern/MOD_laplaciandeform.cc index 41993a2ad77..9188f0e2324 100644 --- a/source/blender/modifiers/intern/MOD_laplaciandeform.cc +++ b/source/blender/modifiers/intern/MOD_laplaciandeform.cc @@ -530,7 +530,7 @@ static void initSystem( if (isValidVertexGroup(lmd, ob, mesh)) { int *index_anchors = static_cast( - MEM_malloc_arrayN(verts_num, sizeof(int), __func__)); /* over-alloc */ + MEM_malloc_arrayN(verts_num, sizeof(int), __func__)); /* Over-allocate. */ STACK_DECLARE(index_anchors); diff --git a/source/blender/modifiers/intern/MOD_solidify_extrude.cc b/source/blender/modifiers/intern/MOD_solidify_extrude.cc index eb889e44332..a0cdcb398d9 100644 --- a/source/blender/modifiers/intern/MOD_solidify_extrude.cc +++ b/source/blender/modifiers/intern/MOD_solidify_extrude.cc @@ -158,7 +158,7 @@ Mesh *MOD_solidify_extrude_modifyMesh(ModifierData *md, const ModifierEvalContex const short mat_ofs_rim = mat_nr_max ? smd->mat_ofs_rim : 0; /* use for edges */ - /* over-alloc new_vert_arr, old_vert_arr */ + /* Over-allocate new_vert_arr, old_vert_arr. */ uint *new_vert_arr = nullptr; STACK_DECLARE(new_vert_arr); diff --git a/source/blender/render/intern/texture_image.cc b/source/blender/render/intern/texture_image.cc index fa67c4cb7bc..3876ef5c0ea 100644 --- a/source/blender/render/intern/texture_image.cc +++ b/source/blender/render/intern/texture_image.cc @@ -270,8 +270,8 @@ int imagewrap(Tex *tex, texres->trgba[3] = 1.0f - texres->trgba[3]; } - /* de-premul, this is being pre-multiplied in shade_input_do_shade() - * do not de-premul for generated alpha, it is already in straight */ + /* De-pre-multiply, this is being pre-multiplied in #shade_input_do_shade() + * do not de-pre-multiply for generated alpha, it is already in straight. */ if (texres->trgba[3] != 1.0f && texres->trgba[3] > 1e-4f && !(tex->imaflag & TEX_CALCALPHA)) { fx = 1.0f / texres->trgba[3]; texres->trgba[0] *= fx; diff --git a/source/blender/windowmanager/intern/wm_files.cc b/source/blender/windowmanager/intern/wm_files.cc index 7886b97ccbc..7a6f6ecdfb2 100644 --- a/source/blender/windowmanager/intern/wm_files.cc +++ b/source/blender/windowmanager/intern/wm_files.cc @@ -3988,7 +3988,7 @@ static void wm_block_file_close_save(bContext *C, void *arg_block, void *arg_dat if (file_has_been_saved_before) { if (bmain->has_forward_compatibility_issues) { - /* Need to invoke to get the filebrowser and choose where to save the new file. + /* Need to invoke to get the file-browser and choose where to save the new file. * This also makes it impossible to keep on going with current operation, which is why * callback cannot be executed anymore. * diff --git a/source/blender/windowmanager/message_bus/wm_message_bus.h b/source/blender/windowmanager/message_bus/wm_message_bus.h index cdfaec282f7..4c4815ef4bf 100644 --- a/source/blender/windowmanager/message_bus/wm_message_bus.h +++ b/source/blender/windowmanager/message_bus/wm_message_bus.h @@ -71,7 +71,7 @@ typedef struct wmMsgSubscribeKey { /** Linked list for predictable ordering, otherwise we would depend on #GHash bucketing. */ struct wmMsgSubscribeKey *next, *prev; ListBase values; - /* over-alloc, eg: wmMsgSubscribeKey_RNA */ + /* Over-allocate, eg: #wmMsgSubscribeKey_RNA */ /* Last member will be 'wmMsg_*' */ } wmMsgSubscribeKey; diff --git a/source/blender/windowmanager/wm_files.h b/source/blender/windowmanager/wm_files.h index bb534fa5291..aa186c77a16 100644 --- a/source/blender/windowmanager/wm_files.h +++ b/source/blender/windowmanager/wm_files.h @@ -90,7 +90,7 @@ bool wm_operator_close_file_dialog_if_needed(bContext *C, */ bool wm_file_or_session_data_has_unsaved_changes(const Main *bmain, const wmWindowManager *wm); /** - * Confirmation dialog when user is about to save the current blend file, and it was prviously + * Confirmation dialog when user is about to save the current blend file, and it was previously * created by a newer version of Blender. * * Important to ask confirmation, as this is a very common scenario of data loss. diff --git a/tools/check_source/check_spelling_c_config.py b/tools/check_source/check_spelling_c_config.py index 54ef32949fd..7ae448c47c1 100644 --- a/tools/check_source/check_spelling_c_config.py +++ b/tools/check_source/check_spelling_c_config.py @@ -76,6 +76,8 @@ dict_custom = { "criterium", "crosshair", "crosstalk", + "cumulate", + "cumulated", "customizable", "deallocate", "deallocated",