From 7582b15c4c35355752498768f2e60c7d6a4d7149 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 16 Feb 2024 14:26:46 +1100 Subject: [PATCH] Cleanup: spelling in comments --- source/blender/blenkernel/BKE_duplilist.hh | 2 +- source/blender/blenkernel/BKE_writeffmpeg.hh | 2 +- source/blender/blenkernel/intern/lib_remap_test.cc | 4 ++-- .../grease_pencil/intern/grease_pencil_undo.cc | 12 +++++++----- source/blender/geometry/intern/extend_curves.cc | 4 ++-- source/blender/gpu/GPU_shader.h | 6 +++--- .../modifiers/intern/MOD_grease_pencil_length.cc | 6 +++--- source/creator/creator_args.cc | 2 +- 8 files changed, 20 insertions(+), 18 deletions(-) diff --git a/source/blender/blenkernel/BKE_duplilist.hh b/source/blender/blenkernel/BKE_duplilist.hh index 7cf921ede8c..5b5cc52474e 100644 --- a/source/blender/blenkernel/BKE_duplilist.hh +++ b/source/blender/blenkernel/BKE_duplilist.hh @@ -45,7 +45,7 @@ struct DupliObject { float mat[4][4]; float orco[3], uv[2]; - short type; /* from Object.transflag */ + short type; /* From #Object::transflag. */ char no_draw; /* If this dupli object is belongs to a preview, this is non-null. */ const blender::bke::GeometrySet *preview_base_geometry; diff --git a/source/blender/blenkernel/BKE_writeffmpeg.hh b/source/blender/blenkernel/BKE_writeffmpeg.hh index cbbe2590fc7..d63e1cfcf25 100644 --- a/source/blender/blenkernel/BKE_writeffmpeg.hh +++ b/source/blender/blenkernel/BKE_writeffmpeg.hh @@ -74,7 +74,7 @@ void BKE_ffmpeg_context_free(void *context_v); void BKE_ffmpeg_exit(); /** - * Gets a libswscale context for given size and format parameters. + * Gets a `libswscale` context for given size and format parameters. * After you're done using the context, call #BKE_ffmpeg_sws_release_context * to release it. Internally the contexts are coming from the context * pool/cache. diff --git a/source/blender/blenkernel/intern/lib_remap_test.cc b/source/blender/blenkernel/intern/lib_remap_test.cc index f4ba8a26350..c284fc66a36 100644 --- a/source/blender/blenkernel/intern/lib_remap_test.cc +++ b/source/blender/blenkernel/intern/lib_remap_test.cc @@ -316,8 +316,8 @@ TEST(lib_remap, never_null_usage_storage_requested_on_delete) remapper, (ID_REMAP_SKIP_NEVER_NULL_USAGE | ID_REMAP_STORE_NEVER_NULL_USAGE)); - /* Never null usages unassignement is not enforced (no #ID_REMAP_FORCE_NEVER_NULL_USAGE), so the - * obdta should still use the original mesh. */ + /* Never null usages un-assignment is not enforced (no #ID_REMAP_FORCE_NEVER_NULL_USAGE), + * so the object-data should still use the original mesh. */ EXPECT_EQ(context.test_data.object->data, context.test_data.mesh); EXPECT_NE(context.test_data.object->data, nullptr); EXPECT_TRUE(remapper.never_null_users().contains(&context.test_data.object->id)); diff --git a/source/blender/editors/grease_pencil/intern/grease_pencil_undo.cc b/source/blender/editors/grease_pencil/intern/grease_pencil_undo.cc index ad47efa6a3c..fe34595df72 100644 --- a/source/blender/editors/grease_pencil/intern/grease_pencil_undo.cc +++ b/source/blender/editors/grease_pencil/intern/grease_pencil_undo.cc @@ -69,17 +69,19 @@ class StepDrawingGeometryBase { /* Index of this drawing in the original combined array of all drawings in GreasePencil ID. */ int index_; - /* Data from #GreasePencilDrawingBase that needs to be saved in udo steps. */ + /* Data from #GreasePencilDrawingBase that needs to be saved in undo steps. */ uint32_t flag_; protected: - /* Ensures that the drawing from the given array at the current index exists, and has the propoer - * type. + /** + * Ensures that the drawing from the given array at the current index exists, + * and has the proposer type. * - * Non-existing drawings can happen after extenting the drawings array. + * Non-existing drawings can happen after extending the drawings array. * * Mismatch in drawing types can happen when some drawings have been deleted between the undo - * step storage, and the current state of the GreasePencil data. */ + * step storage, and the current state of the GreasePencil data. + */ void decode_valid_drawingtype_at_index_ensure(MutableSpan &drawings, const GreasePencilDrawingType drawing_type) const { diff --git a/source/blender/geometry/intern/extend_curves.cc b/source/blender/geometry/intern/extend_curves.cc index 319f2f02691..d856a0aa95e 100644 --- a/source/blender/geometry/intern/extend_curves.cc +++ b/source/blender/geometry/intern/extend_curves.cc @@ -37,7 +37,7 @@ static void extend_curves_straight(const float used_percent_length, float overshoot_point_param = used_percent_length * (new_size - 1); if (start_points[curve]) { /** Here we use the vector between two adjacent points around #overshoot_point_param as - * our reference forthe direction of extention, however to have better tolerance for jitter, + * our reference for the direction of extension, however to have better tolerance for jitter, * using the vector (a_few_points_back - end_point) might be a better solution in the future. */ int index1 = math::floor(overshoot_point_param); @@ -271,7 +271,7 @@ bke::CurvesGeometry extend_curves(bke::CurvesGeometry &src_curves, OffsetIndices dst_indices = offset_indices::accumulate_counts_to_offsets(dst_points_by_curve); int target_point_count = dst_points_by_curve.last(); - /* Make dest to source map for points. */ + /* Make destination to source map for points. */ Array dst_to_src_point(target_point_count); for (const int curve : src_curves.curves_range()) { const int point_count = points_by_curve[curve].size(); diff --git a/source/blender/gpu/GPU_shader.h b/source/blender/gpu/GPU_shader.h index 1498542a084..556513c25fa 100644 --- a/source/blender/gpu/GPU_shader.h +++ b/source/blender/gpu/GPU_shader.h @@ -333,13 +333,13 @@ typedef enum { int GPU_shader_get_builtin_uniform(GPUShader *shader, int builtin); /** - * Compile all staticly defined shaders and print a report to the console. + * Compile all statically defined shaders and print a report to the console. * * This is used for platform support, where bug reports can list all failing shaders. */ void GPU_shader_compile_static(); -/** DEPRECATED: Use hardcoded buffer location instead. */ +/** DEPRECATED: Use hard-coded buffer location instead. */ typedef enum { GPU_UNIFORM_BLOCK_VIEW = 0, /* viewBlock */ GPU_UNIFORM_BLOCK_MODEL, /* modelBlock */ @@ -353,7 +353,7 @@ typedef enum { GPU_NUM_UNIFORM_BLOCKS, /* Special value, denotes number of builtin uniforms block. */ } GPUUniformBlockBuiltin; -/** DEPRECATED: Use hardcoded buffer location instead. */ +/** DEPRECATED: Use hard-coded buffer location instead. */ int GPU_shader_get_builtin_block(GPUShader *shader, int builtin); /** DEPRECATED: Kept only because of Python GPU API. */ diff --git a/source/blender/modifiers/intern/MOD_grease_pencil_length.cc b/source/blender/modifiers/intern/MOD_grease_pencil_length.cc index 97f4bef5b59..7a98ae38273 100644 --- a/source/blender/modifiers/intern/MOD_grease_pencil_length.cc +++ b/source/blender/modifiers/intern/MOD_grease_pencil_length.cc @@ -196,9 +196,9 @@ static void deform_drawing(const ModifierData &md, /* Always do the stretching first since it might depend on points which could be deleted by the * shrink. */ if (mmd.start_fac < 0.0f || mmd.end_fac < 0.0f || needs_additional_shrinking) { - /* `trim_curves()` accepts the `end` valueas if it's sampling from the beginning of the - * curve, so we need to get the lengths of the curves and substract it from the back when the - * modifier is in Absolute mode. For convenience, we always call `trim_curves()` in LENGTH + /* #trim_curves() accepts the `end` values if it's sampling from the beginning of the + * curve, so we need to get the lengths of the curves and subtract it from the back when the + * modifier is in Absolute mode. For convenience, we always call #trim_curves() in LENGTH * mode since the function itself will need length to be sampled anyway. */ Array starts(curves.curves_num()); Array ends(curves.curves_num()); diff --git a/source/creator/creator_args.cc b/source/creator/creator_args.cc index be76fb08a9a..1b41ebe5cdb 100644 --- a/source/creator/creator_args.cc +++ b/source/creator/creator_args.cc @@ -1227,7 +1227,7 @@ static int arg_handle_debug_gpu_set(int /*argc*/, const char ** /*argv*/, void * static const char arg_handle_debug_gpu_compile_shaders_set_doc[] = "\n" - "\tCompile all staticly defined shaders to test platform compatibility."; + "\tCompile all statically defined shaders to test platform compatibility."; static int arg_handle_debug_gpu_compile_shaders_set(int /*argc*/, const char ** /*argv*/, void * /*data*/)