Cleanup: spelling in comments, strings

This commit is contained in:
Campbell Barton 2023-12-07 12:15:45 +11:00
parent bad4390663
commit 497600e49e
31 changed files with 55 additions and 55 deletions

View File

@ -580,8 +580,8 @@ extern GHOST_ContextHandle GHOST_GetDrawingContext(GHOST_WindowHandle windowhand
extern void GHOST_SetTitle(GHOST_WindowHandle windowhandle, const char *title);
/**
* Returns the title displayed in the title bar. The title
* should be free'd with free().
* Returns the title displayed in the title bar.
* The title must be freed with free().
*
* \param windowhandle: The handle to the window.
* \return The title, free with free().

View File

@ -7530,7 +7530,7 @@ static void cursor_anim_begin(GWL_Seat *seat)
auto cursor_anim_frame_step_fn =
[](GWL_Seat *seat, GWL_Cursor_AnimHandle *anim_handle, int delay) {
/* It's possible the `wl_cursor` is reloaded while the cursor is animating.
* Don't access outside the lock, tha's why the `delay` is passed in. */
* Don't access outside the lock, that's why the `delay` is passed in. */
std::mutex *server_mutex = seat->system->server_mutex;
int frame = 0;
while (!anim_handle->exit_pending.load()) {

View File

@ -137,7 +137,7 @@ static void bonecoll_ensure_name_unique(bArmature *armature, BoneCollection *bco
}
/**
* Inserts bcoll into armature's array of bone collecions at index.
* Inserts bcoll into armature's array of bone collections at index.
*
* Note: the specified index is where the given bone collection will end up.
* This means, for example, that for a collection array of length N, you can

View File

@ -349,7 +349,7 @@ typedef struct FontBLF {
int char_weight; /* 100 - 900, 400 = normal. */
float char_slant; /* Slant in clockwise degrees. 0.0 = upright. */
float char_width; /* Factor of normal character width. 1.0 = normal. */
float char_spacing; /* Factor of normal normal spacing. 0.0 = normal. */
float char_spacing; /* Factor of normal character spacing. 0.0 = normal. */
/** Max texture size. */
int tex_size_max;

View File

@ -348,8 +348,8 @@ void CustomData_bmesh_copy_data(const CustomData *source,
void *src_block,
void **dest_block);
/**
* Copy all layers from the sourde to the destination block. Allocate the result block if
* necessary, otherwise free its existing layer data.
* Copy all layers from the source to the destination block.
* Allocate the result block if necessary, otherwise free its existing layer data.
*/
void CustomData_bmesh_copy_block(CustomData &data, void *src_block, void **dst_block);
void CustomData_bmesh_copy_data_exclude_by_type(const CustomData *source,

View File

@ -140,7 +140,7 @@ struct MeshRuntime {
CustomData_MeshMasks cd_mask_extra = {};
/**
* Grids representation for multiresolution sculpting. When this is set, the mesh will be empty,
* Grids representation for multi-resolution sculpting. When this is set, the mesh will be empty,
* since it is conceptually replaced with the limited data stored in the grids.
*/
std::unique_ptr<SubdivCCG> subdiv_ccg;

View File

@ -92,7 +92,7 @@ std::optional<int> BKE_previewimg_deferred_thumb_source_get(const PreviewImage *
/**
* Create an #ImBuf holding a copy of the preview image buffer in \a prv.
* \note The returned image buffer has to be free'd (#IMB_freeImBuf()).
* \note The returned image buffer has to be freed (#IMB_freeImBuf()).
*/
ImBuf *BKE_previewimg_to_imbuf(PreviewImage *prv, int size);

View File

@ -440,7 +440,7 @@ TEST(lib_id_main_unique_name, name_number_suffix_assignment)
EXPECT_TRUE(BKE_main_namemap_validate(ctx.bmain));
/* Create objects again; they should get suffixes that were just free'd up. */
/* Create objects again; they should get suffixes that were just freed up. */
ID *id_010 = static_cast<ID *>(BKE_id_new(ctx.bmain, ID_OB, "Foo"));
EXPECT_STREQ(id_010->name + 2, "Foo.010");
ID *id_020 = static_cast<ID *>(BKE_id_new(ctx.bmain, ID_OB, "Foo.123"));

View File

@ -786,7 +786,7 @@ struct LibOverrideGroupTagData {
/** Whether we are creating new override, or resyncing existing one. */
bool is_resync;
/** ID tag to use for IDs detected as beeing part of the liboverride hierarchy. */
/** ID tag to use for IDs detected as being part of the liboverride hierarchy. */
uint tag;
uint missing_tag;
@ -1461,7 +1461,7 @@ static void lib_override_library_create_post_process(Main *bmain,
if (old_active_object == ob) {
BLI_assert(view_layer);
/* May have been tagged as dirty again in a previous iteration of this loop, e.g. if adding a
* liboverride object to a colleciton. */
* liboverride object to a collection. */
BKE_view_layer_synced_ensure(scene, view_layer);
Base *basact = BKE_view_layer_base_find(view_layer, ob_new);
if (basact != nullptr) {

View File

@ -298,7 +298,7 @@ static void main_merge_add_id_to_move(Main *bmain_dst,
void BKE_main_merge(Main *bmain_dst, Main **r_bmain_src, MainMergeReport &reports)
{
Main *bmain_src = *r_bmain_src;
/* NOTE: Dedicated mapping type is needed here, to handle propoerly the library cases. */
/* NOTE: Dedicated mapping type is needed here, to handle properly the library cases. */
blender::Map<std::string, blender::Vector<ID *>> id_map_dst;
ID *id_iter_dst, *id_iter_src;
FOREACH_MAIN_ID_BEGIN (bmain_dst, id_iter_dst) {

View File

@ -212,7 +212,7 @@ TEST_F(BMainMergeTest, linked_data)
/* Use a relative library path. Since this is a different library, even though the object re-use
* the same name, it should still be moved into `bmain_dst`. The library filepath should also be
* updated and become relative the the path of bmain_dst too. */
* updated and become relative the path of bmain_dst too. */
bmain_src = BKE_main_new();
BLI_strncpy(bmain_src->filepath, SRC_PATH, sizeof(bmain_dst->filepath));

View File

@ -3406,7 +3406,7 @@ static void free_localized_node_groups(bNodeTree *ntree)
{
/* Only localized node trees store a copy for each node group tree.
* Each node group tree in a localized node tree can be freed,
* since it is a localized copy itself (no risk of accessing free'd
* since it is a localized copy itself (no risk of accessing freed
* data in main, see #37939). */
if (!(ntree->id.tag & LIB_TAG_LOCALIZED)) {
return;

View File

@ -567,7 +567,7 @@ static const AVCodec *get_av1_encoder(
break;
}
if (context->ffmpeg_crf >= 0) {
/* `libsvtav1` does not support `crf` until FFmpeg builds since 2022-02-24,
/* `libsvtav1` does not support CRF until FFMPEG builds since 2022-02-24,
* use `qp` as fallback. */
ffmpeg_dict_set_int(opts, "qp", context->ffmpeg_crf);
}
@ -762,9 +762,9 @@ static AVStream *alloc_video_stream(FFMpegContext *context,
}
else if (context->ffmpeg_crf >= 0) {
/* As per https://trac.ffmpeg.org/wiki/Encode/VP9 we must set the bit rate to zero when
* encoding with vp9 in crf mode.
* encoding with VP9 in CRF mode.
* Set this to always be zero for other codecs as well.
* We don't care about bit rate in crf mode. */
* We don't care about bit rate in CRF mode. */
c->bit_rate = 0;
ffmpeg_dict_set_int(&opts, "crf", context->ffmpeg_crf);
}
@ -776,11 +776,11 @@ static AVStream *alloc_video_stream(FFMpegContext *context,
}
if (context->ffmpeg_preset) {
/* 'preset' is used by h.264, 'deadline' is used by webm/vp9. I'm not
/* 'preset' is used by h.264, 'deadline' is used by WEBM/VP9. I'm not
* setting those properties conditionally based on the video codec,
* as the FFmpeg encoder simply ignores unknown settings anyway. */
char const *preset_name = nullptr; /* used by h.264 */
char const *deadline_name = nullptr; /* used by webm/vp9 */
char const *preset_name = nullptr; /* Used by h.264. */
char const *deadline_name = nullptr; /* Used by WEBM/VP9. */
switch (context->ffmpeg_preset) {
case FFM_PRESET_GOOD:
preset_name = "medium";
@ -818,7 +818,7 @@ static AVStream *alloc_video_stream(FFMpegContext *context,
}
if (context->ffmpeg_type == FFMPEG_XVID) {
/* arghhhh ... */
/* Alas! */
c->pix_fmt = AV_PIX_FMT_YUV420P;
c->codec_tag = (('D' << 24) + ('I' << 16) + ('V' << 8) + 'X');
}
@ -903,7 +903,7 @@ static AVStream *alloc_video_stream(FFMpegContext *context,
}
av_dict_free(&opts);
/* FFmpeg expects its data in the output pixel format. */
/* FFMPEG expects its data in the output pixel format. */
context->current_frame = alloc_picture(c->pix_fmt, c->width, c->height);
if (c->pix_fmt == AV_PIX_FMT_RGBA) {
@ -1003,8 +1003,8 @@ static AVStream *alloc_audio_stream(FFMpegContext *context,
if (codec->sample_fmts) {
/* Check if the preferred sample format for this codec is supported.
* this is because, depending on the version of libav,
* and with the whole ffmpeg/libav fork situation,
* this is because, depending on the version of LIBAV,
* and with the whole FFMPEG/LIBAV fork situation,
* you have various implementations around.
* Float samples in particular are not always supported. */
const enum AVSampleFormat *p = codec->sample_fmts;
@ -1051,14 +1051,14 @@ static AVStream *alloc_audio_stream(FFMpegContext *context,
}
/* Need to prevent floating point exception when using VORBIS audio codec,
* initialize this value in the same way as it's done in FFmpeg itself (sergey) */
* initialize this value in the same way as it's done in FFMPEG itself (sergey) */
c->time_base.num = 1;
c->time_base.den = c->sample_rate;
if (c->frame_size == 0) {
/* Used to be if ((c->codec_id >= CODEC_ID_PCM_S16LE) && (c->codec_id <= CODEC_ID_PCM_DVD))
* not sure if that is needed anymore, so let's try out if there are any
* complaints regarding some FFmpeg versions users might have. */
* complaints regarding some FFMPEG versions users might have. */
context->audio_input_samples = AV_INPUT_BUFFER_MIN_SIZE * 8 / c->bits_per_coded_sample /
num_channels;
}
@ -1134,7 +1134,7 @@ static int start_ffmpeg_impl(FFMpegContext *context,
/* Determine the correct filename */
ffmpeg_filepath_get(context, filepath, rd, context->ffmpeg_preview, suffix);
PRINT(
"Starting output to %s(ffmpeg)...\n"
"Starting output to %s(FFMPEG)...\n"
" Using type=%d, codec=%d, audio_codec=%d,\n"
" video_bitrate=%d, audio_bitrate=%d,\n"
" gop_size=%d, autosplit=%d\n"
@ -1165,7 +1165,7 @@ static int start_ffmpeg_impl(FFMpegContext *context,
of = avformat_alloc_context();
if (!of) {
BKE_report(reports, RPT_ERROR, "Can't allocate ffmpeg format context");
BKE_report(reports, RPT_ERROR, "Can't allocate FFMPEG format context");
return 0;
}
@ -1236,7 +1236,7 @@ static int start_ffmpeg_impl(FFMpegContext *context,
if (context->ffmpeg_audio_codec != AV_CODEC_ID_NONE &&
rd->ffcodecdata.audio_mixrate != 48000 && rd->ffcodecdata.audio_channels != 2)
{
BKE_report(reports, RPT_ERROR, "FFmpeg only supports 48khz / stereo audio for DV!");
BKE_report(reports, RPT_ERROR, "FFMPEG only supports 48khz / stereo audio for DV!");
goto fail;
}
}
@ -1571,7 +1571,7 @@ int BKE_ffmpeg_append(void *context_v,
static void end_ffmpeg_impl(FFMpegContext *context, int is_autosplit)
{
PRINT("Closing ffmpeg...\n");
PRINT("Closing FFMPEG...\n");
# ifdef WITH_AUDASPACE
if (is_autosplit == false) {
@ -1825,9 +1825,9 @@ bool BKE_ffmpeg_alpha_channel_is_supported(const RenderData *rd)
void *BKE_ffmpeg_context_create()
{
/* new ffmpeg data struct */
/* New FFMPEG data struct. */
FFMpegContext *context = static_cast<FFMpegContext *>(
MEM_callocN(sizeof(FFMpegContext), "new ffmpeg context"));
MEM_callocN(sizeof(FFMpegContext), "new FFMPEG context"));
context->ffmpeg_codec = AV_CODEC_ID_MPEG4;
context->ffmpeg_audio_codec = AV_CODEC_ID_NONE;

View File

@ -49,7 +49,7 @@ void BLI_memarena_merge(MemArena *ma_dst, MemArena *ma_src) ATTR_NONNULL(1, 2);
/**
* Clear for reuse, avoids re-allocation when an arena may
* otherwise be free'd and recreated.
* otherwise be freed and recreated.
*/
void BLI_memarena_clear(MemArena *ma) ATTR_NONNULL(1);

View File

@ -528,7 +528,7 @@ void BLI_mempool_free(BLI_mempool *pool, void *addr)
pool->totalloc = pool->pchunk;
#endif
/* Temp alloc so valgrind doesn't complain when setting free'd blocks 'next'. */
/* Temporary allocation so VALGRIND doesn't complain when setting freed blocks 'next'. */
#ifdef WITH_MEM_VALGRIND
VALGRIND_MEMPOOL_ALLOC(pool, CHUNK_DATA(first), pool->csize);
#endif

View File

@ -454,7 +454,7 @@ int BLI_rename(const char *from, const char *to)
* Since this functionality isn't required at the moment, leave this as-is.
* Noting it as a potential improvement. */
/* NOTE: To avoid the concurrency 'time of check/time of use' (TOC/TOU) issue, this code attemps
/* NOTE: To avoid the concurrency 'time of check/time of use' (TOC/TOU) issue, this code attempts
* to use available solutions for an 'atomic' (file-system wise) rename operation, instead of
* first checking for an existing `to` target path, and then doing the rename operation if it
* does not exists at the time of check.

View File

@ -125,7 +125,7 @@ TEST_F(FileOpsTest, rename)
ASSERT_TRUE(BLI_exists(test_dirpath_src.c_str()));
ASSERT_TRUE(BLI_exists(test_dirpath_dst.c_str()));
/* `test_dirpath_dst` now exists, but is empty, so overwrite rename should suceed. */
/* `test_dirpath_dst` now exists, but is empty, so overwrite rename should succeed. */
ASSERT_EQ(0, BLI_rename_overwrite(test_dirpath_src.c_str(), test_dirpath_dst.c_str()));
ASSERT_FALSE(BLI_exists(test_dirpath_src.c_str()));
ASSERT_TRUE(BLI_exists(test_dirpath_dst.c_str()));

View File

@ -328,7 +328,7 @@ static void versioning_eevee_shadow_settings(Object *object)
static void versioning_replace_splitviewer(bNodeTree *ntree)
{
/* Split viewer was replaced with a regular split node, so add a viewer node,
* and link it to the new split node to achive the same behavior of the split viewer node. */
* and link it to the new split node to achieve the same behavior of the split viewer node. */
LISTBASE_FOREACH_MUTABLE (bNode *, node, &ntree->nodes) {
if (node->type != CMP_NODE_SPLITVIEWER__DEPRECATED) {
@ -1001,7 +1001,7 @@ static void versioning_replace_musgrave_texture_node(bNodeTree *ntree)
*version_cycles_node_socket_float_value(mul_socket_B) = *detail;
if (noise_type == SHD_NOISE_MULTIFRACTAL) {
/* Add Add Math node after Multiply Math node. */
/* Add an Add Math node after Multiply Math node. */
bNode *add_node = nodeAddStaticNode(nullptr, ntree, SH_NODE_MATH);
add_node->parent = node->parent;

View File

@ -253,7 +253,7 @@ static bool bm_loop_path_build_step(BLI_mempool *vs_pool,
/* Commented because used in a loop, and this flag has already been set. */
// bm->elem_index_dirty |= BM_VERT;
/* lb is now full of free'd items, overwrite */
/* `lb` is now full of freed items, overwrite. */
*lb = lb_tmp;
return (BLI_listbase_is_empty(lb) == false);

View File

@ -162,9 +162,9 @@ ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) BLI_INLINE
/**
* \brief Parallel (threaded) iterator,
* only available for most basic itertypes (verts/edges/faces of mesh).
* only available for most basic iteration-types (verts/edges/faces of mesh).
*
* Uses BLI_task_parallel_mempool to iterate over all items of underlying matching mempool.
* Uses #BLI_task_parallel_mempool to iterate over all items of underlying matching mempool.
*
* \note You have to include BLI_task.h before BMesh includes to be able to use this function!
*/

View File

@ -65,7 +65,7 @@ void BM_log_cleanup_entry(BMLogEntry *entry);
* Remove an entry from the log.
*
* Uses entry->log as the log. If the log is NULL, the entry will be
* free'd but not removed from any list, nor shall its IDs be released.
* freed but not removed from any list, nor shall its IDs be released.
*
* This operation is only valid on the first and last entries in the
* log. Deleting from the middle will assert.

View File

@ -505,7 +505,7 @@ void _bmo_slot_copy(BMOpSlot slot_args_src[BMO_OP_MAX_SLOTS],
/** \} */
/* del "context" slot values, used for operator too */
/** Delete "context" slot values, used for operator too. */
enum {
DEL_VERTS = 1,
DEL_EDGES,

View File

@ -700,7 +700,7 @@ bool BM_face_is_any_edge_flag_test(const BMFace *f, char hflag) ATTR_WARN_UNUSED
bool BM_edge_is_any_face_len_test(const BMEdge *e, int len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
/**
* Use within assert's to check normals are valid.
* Use within asserts to check normals are valid.
*/
bool BM_face_is_normal_valid(const BMFace *f) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();

View File

@ -242,7 +242,7 @@ GBufferDataPacked gbuffer_pack(ClosureDiffuse diffuse,
}
if (layer == 0) {
/* If no lit BDSF is outputed, still output the surface normal in the first layer.
/* If no lit BDSF is outputted, still output the surface normal in the first layer.
* This is needed by some algorithms. */
gbuf.color[layer] = vec4(0.0);
gbuf.closure[layer].xy = gbuffer_normal_pack(default_N);

View File

@ -85,7 +85,7 @@ void main()
GBufferDataPacked gbuf = gbuffer_pack(
g_diffuse_data, g_reflection_data, g_refraction_data, out_normal, thickness);
/* Output header and first closure using framebuffer attachment. */
/* Output header and first closure using frame-buffer attachment. */
out_gbuf_header = gbuf.header;
out_gbuf_color = gbuf.color[0];
out_gbuf_closure = gbuf.closure[0];

View File

@ -98,7 +98,7 @@ struct VertShaded {
}
};
/* Batch's only (free'd as an array) */
/* Batch's only (freed as an array). */
static struct DRWShapeCache {
GPUBatch *drw_procedural_verts;
GPUBatch *drw_procedural_lines;

View File

@ -160,11 +160,11 @@ typedef struct GPULoadStore {
* whole.
*
* NOTE: Using GPU_framebuffer_clear_* functions in conjunction with a custom load-store
* configuration is invalid. Instead, utilise GPU_LOADACTION_CLEAR and provide a clear color as
* configuration is invalid. Instead, utilize GPU_LOADACTION_CLEAR and provide a clear color as
* the third parameter in `GPULoadStore action`.
*
* For Color attachments: {GPU_LOADACTION_CLEAR, GPU_STOREACTION_STORE, {Rf, Gf, Bf, Af}}
* For Depth attachments: {GPU_LOADACTION_CLEAR, GPU_STOREACTION_STORE, {Df}}
* For Color attachments: `{GPU_LOADACTION_CLEAR, GPU_STOREACTION_STORE, {Rf, Gf, Bf, Af}}`
* For Depth attachments: `{GPU_LOADACTION_CLEAR, GPU_STOREACTION_STORE, {Df}}`
*
* Example:
* \code{.c}

View File

@ -1788,7 +1788,7 @@ static int exr_has_rgb(MultiPartInputFile &file, const char *rgb_channels[3])
int num_channels = 0;
for (int i = 0; channel_names[i]; i++) {
/* Also try to match lower case variant of of the channel names. */
/* Also try to match lower case variant of the channel names. */
std::string lower_case_name = std::string(channel_names[i]);
std::transform(lower_case_name.begin(),
lower_case_name.end(),

View File

@ -1364,7 +1364,7 @@ static const EnumPropertyItem rna_enum_xr_action_types[] = {
"VECTOR2D",
0,
"Vector2D",
"2D float vector action, representing a thumbstick or trackpad"},
"2D float vector action, representing a thumb-stick or track-pad"},
{XR_POSE_INPUT,
"POSE",
0,

View File

@ -30,7 +30,7 @@
#include "bpy_rna.h"
/* -------------------------------------------------------------------- */
/** \name Private Utility Funcitons
/** \name Private Utility Functions
* \{ */
static void bpy_rna_context_temp_set_screen_for_window(bContext *C, wmWindow *win, bScreen *screen)

View File

@ -512,7 +512,7 @@ static void do_cross_effect(const SeqRenderData *context,
/* One could argue that gamma cross should not be hardcoded to 2.0 gamma,
* but instead either do proper input->linear conversion (often sRGB). Or
* maybe not even that, but do interpolation in some perceptual color space
* like Oklab. But currently it is fixed to just 2.0 gamma. */
* like OKLAB. But currently it is fixed to just 2.0 gamma. */
static float gammaCorrect(float c)
{