Cleanup: Remove repeated word in comments

This commit is contained in:
Campbell Barton 2022-02-23 18:24:08 +11:00
parent 165b030b19
commit 7393cc1db7
36 changed files with 44 additions and 42 deletions

View File

@ -75,7 +75,7 @@ bool OpenGLDisplayDriver::update_begin(const Params &params, int texture_width,
/* Update PBO dimensions if needed.
*
* NOTE: Allocate the PBO for the the size which will fit the final render resolution (as in,
* NOTE: Allocate the PBO for the size which will fit the final render resolution (as in,
* at a resolution divider 1. This was we don't need to recreate graphics interoperability
* objects which are costly and which are tied to the specific underlying buffer size.
* The downside of this approach is that when graphics interoperability is not used we are

View File

@ -244,7 +244,7 @@ void RenderScheduler::render_work_reschedule_on_cancel(RenderWork &render_work)
render_work.tile.write = tile_write;
render_work.full.write = full_write;
/* Do not write tile if it has zero samples it it, treat it similarly to all other tiles which
/* Do not write tile if it has zero samples it, treat it similarly to all other tiles which
* got canceled. */
if (!state_.tile_result_was_written && has_rendered_samples) {
render_work.tile.write = true;

View File

@ -124,7 +124,7 @@ class RenderScheduler {
/* Get sample up to which rendering has been done.
* This is an absolute 0-based value.
*
* For example, if start sample is 10 and and 5 samples were rendered, then this call will
* For example, if start sample is 10 and 5 samples were rendered, then this call will
* return 14.
*
* If there were no samples rendered, then the behavior is undefined. */
@ -132,7 +132,7 @@ class RenderScheduler {
/* Get number of samples rendered within the current scheduling session.
*
* For example, if start sample is 10 and and 5 samples were rendered, then this call will
* For example, if start sample is 10 and 5 samples were rendered, then this call will
* return 5.
*
* Note that this is based on the scheduling information. In practice this means that if someone

View File

@ -227,7 +227,7 @@ struct WriteAttributeLookup {
* - An output attribute can live side by side with an existing attribute with a different domain
* or data type. The old attribute will only be overwritten when the #save function is called.
*
* \note The lifetime of an output attribute should not be longer than the the lifetime of the
* \note The lifetime of an output attribute should not be longer than the lifetime of the
* geometry component it comes from, since it can keep a reference to the component for use in
* the #save method.
*/

View File

@ -693,7 +693,7 @@ class CurveComponent : public GeometryComponent {
/**
* Holds a reference to conceptually unique geometry or a pointer to object/collection data
* that is is instanced with a transform in #InstancesComponent.
* that is instanced with a transform in #InstancesComponent.
*/
class InstanceReference {
public:

View File

@ -169,7 +169,7 @@ struct IDProperty *IDP_GetPropertyTypeFromGroup(const struct IDProperty *prop,
/*-------- Main Functions --------*/
/**
* Get the Group property that contains the id properties for ID id.
* Get the Group property that contains the id properties for ID `id`.
*
* \param create_if_needed: Set to create the group property and attach it to id if it doesn't
* exist; otherwise the function will return NULL if there's no Group property attached to the ID.

View File

@ -52,7 +52,7 @@ TEST_F(AssetLibraryTest, bke_asset_library_load)
ASSERT_NE(nullptr, service);
/* Check that the catalogs defined in the library are actually loaded. This just tests one single
* catalog, as that indicates the file has been loaded. Testing that that loading went OK is for
* catalog, as that indicates the file has been loaded. Testing that loading went OK is for
* the asset catalog service tests. */
const bUUID uuid_poses_ellie("df60e1f6-2259-475b-93d9-69a1b4a8db78");
AssetCatalog *poses_ellie = service->find_catalog(uuid_poses_ellie);

View File

@ -144,7 +144,7 @@ static void brush_make_local(Main *bmain, ID *id, const int flags)
/* FIXME: Recursive calls affecting other non-embedded IDs are really bad and should be avoided
* in IDType callbacks. Higher-level ID management code usually does not expect such things and
* does not deal properly with it. */
/* NOTE: assert below ensures that the comment above is valid, and that that exception is
/* NOTE: assert below ensures that the comment above is valid, and that exception is
* acceptable for the time being. */
BKE_lib_id_make_local(bmain, &brush->clone.image->id, 0);
BLI_assert(!ID_IS_LINKED(brush->clone.image) && brush->clone.image->id.newid == NULL);

View File

@ -3292,7 +3292,7 @@ static Mesh *create_liquid_geometry(FluidDomainSettings *fds,
mpolys = me->mpoly;
mloops = me->mloop;
/* Get size (dimension) but considering scaling scaling. */
/* Get size (dimension) but considering scaling. */
copy_v3_v3(cell_size_scaled, fds->cell_size);
mul_v3_v3(cell_size_scaled, ob->scale);
madd_v3fl_v3fl_v3fl_v3i(min, fds->p0, cell_size_scaled, fds->res_min);

View File

@ -292,7 +292,7 @@ static IMesh meshes_to_imesh(Span<const Mesh *> meshes,
r_info->mesh_edge_offset[mi] = e;
r_info->mesh_poly_offset[mi] = f;
/* Get matrix that transforms a coordinate in objects[mi]'s local space
* to the target space space. */
* to the target space. */
const float4x4 objn_mat = (obmats[mi] == nullptr) ? float4x4::identity() :
clean_obmat(*obmats[mi]);
r_info->to_target_transform[mi] = inv_target_mat * objn_mat;

View File

@ -298,7 +298,7 @@ bool BLI_path_parent_dir_until_exists(char *path) ATTR_NONNULL();
bool BLI_path_abs(char *path, const char *basepath) ATTR_NONNULL();
/**
* Replaces "#" character sequence in last slash-separated component of `path`
* with frame as decimal integer, with leading zeroes as necessary, to make digits digits.
* with frame as decimal integer, with leading zeroes as necessary, to make digits.
*/
bool BLI_path_frame(char *path, int frame, int digits) ATTR_NONNULL();
/**

View File

@ -2185,7 +2185,7 @@ static void finish_patch_cell_graph(const IMesh &tm,
* There will be a vector of \a nshapes winding numbers in each cell, one per
* input shape.
* As one crosses a patch into a new cell, the original shape (mesh part)
* that that patch was part of dictates which winding number changes.
* that patch was part of dictates which winding number changes.
* The shape_fn(triangle_number) function should return the shape that the
* triangle is part of.
* Also, as soon as the winding numbers for a cell are set, use bool_optype

View File

@ -532,7 +532,7 @@ static BevVert *find_bevvert(BevelParams *bp, BMVert *bmv)
/**
* Find the EdgeHalf representing the other end of e->e.
* \return Return other end's BevVert in *r_bvother, if r_bvother is provided. That may not have
* \return other end's BevVert in *r_bvother, if r_bvother is provided. That may not have
* been constructed yet, in which case return NULL.
*/
static EdgeHalf *find_other_end_edge_half(BevelParams *bp, EdgeHalf *e, BevVert **r_bvother)

View File

@ -4601,7 +4601,7 @@ void ANIM_channel_draw(
/* Draw slider:
* - Even if we can draw sliders for this view,
* we must also check that the channel-type supports them
* (only only F-Curves really can support them for now).
* (only F-Curves really can support them for now).
* - Slider should start before the toggles (if they're visible)
* to keep a clean line down the side.
*/
@ -5336,7 +5336,7 @@ void ANIM_channel_draw_widgets(const bContext *C,
/* Draw slider:
* - Even if we can draw sliders for this view, we must also check that the channel-type
* supports them (only only F-Curves really can support them for now).
* supports them (only F-Curves really can support them for now).
* - To make things easier, we use RNA-autobuts for this so that changes are
* reflected immediately, wherever they occurred.
* BUT, we don't use the layout engine, otherwise we'd get wrong alignment,

View File

@ -1418,7 +1418,7 @@ static bool ui_but_event_property_operator_string(const bContext *C,
}
/* This version is only for finding hotkeys for properties.
* These are set set via a data-path which is appended to the context,
* These are set via a data-path which is appended to the context,
* manipulated using operators (see #ctx_toggle_opnames). */
if (ptr->owner_id) {

View File

@ -598,7 +598,7 @@ static char *uilist_item_tooltip_func(bContext *UNUSED(C), void *argN, const cha
}
/**
* \note Note that \a layout_type may be null.
* \note that \a layout_type may be null.
*/
static uiList *ui_list_ensure(bContext *C,
uiListType *ui_list_type,

View File

@ -2579,7 +2579,7 @@ static void widget_state(uiWidgetType *wt, int state, int drawflag, eUIEmbossTyp
*
* A lot of places of the UI like the Node Editor or panels are zoomable. In most cases we can
* get the zoom factor from the aspect, but in some cases like popups we need to fall back to
* using the the size of the element. The latter method relies on the element always being the same
* using the size of the element. The latter method relies on the element always being the same
* size.
* \{ */

View File

@ -89,7 +89,7 @@
#include "CLG_log.h"
/* For menu/popup icons etc etc. */
/* For menu/popup icons etc. */
#include "UI_interface.h"
#include "UI_resources.h"

View File

@ -242,7 +242,7 @@ static void graph_main_region_draw(const bContext *C, ARegion *region)
GPU_blend(GPU_BLEND_NONE);
/* Vertical component of of the cursor. */
/* Vertical component of the cursor. */
if (sipo->mode == SIPO_MODE_DRIVERS) {
/* cursor x-value */
float x = sipo->cursorTime;

View File

@ -147,7 +147,7 @@ static void node_buts_curvefloat(uiLayout *layout, bContext *UNUSED(C), PointerR
} // namespace blender::ed::space_node
#define SAMPLE_FLT_ISNONE FLT_MAX
/* Bad bad, 2.5 will do better? ... no it won't! */
/* Bad! 2.5 will do better? ... no it won't! */
static float _sample_col[4] = {SAMPLE_FLT_ISNONE};
void ED_node_sample_set(const float col[4])
{

View File

@ -1049,7 +1049,7 @@ static void node_socket_draw_nested(const bContext &C,
},
data,
MEM_freeN);
/* Disable the button so that clicks on it are ignored the the link operator still works. */
/* Disable the button so that clicks on it are ignored the link operator still works. */
UI_but_flag_enable(but, UI_BUT_DISABLED);
UI_block_emboss_set(&block, old_emboss);
}

View File

@ -1636,7 +1636,9 @@ static void sequencer_draw_gpencil_overlay(const bContext *C)
ED_annotation_draw_view2d(C, 0);
}
/* Draw content and safety borders borders. */
/**
* Draw content and safety borders.
*/
static void sequencer_draw_borders_overlay(const SpaceSeq *sseq,
const View2D *v2d,
const Scene *scene)

View File

@ -26,7 +26,7 @@ struct FieldTreeInfo {
*/
MultiValueMap<GFieldRef, GFieldRef> field_users;
/**
* The same field input may exist in the field tree as as separate nodes due to the way
* The same field input may exist in the field tree as separate nodes due to the way
* the tree is constructed. This set contains every different input only once.
*/
VectorSet<std::reference_wrapper<const FieldInput>> deduplicated_field_inputs;
@ -137,7 +137,7 @@ static Set<GFieldRef> find_varying_fields(const FieldTreeInfo &field_tree_info,
}
/**
* Builds the #procedure so that it computes the the fields.
* Builds the #procedure so that it computes the fields.
*/
static void build_multi_function_procedure_for_fields(MFProcedure &procedure,
ResourceScope &scope,

View File

@ -497,9 +497,9 @@ struct ShaderCreateInfo {
/**
* IMPORTANT: invocations count is only used if GL_ARB_gpu_shader5 is supported. On
* implementations that do not supports it, the max_vertices will be be multiplied by
* invocations. Your shader needs to account for this fact. Use `#ifdef GPU_ARB_gpu_shader5`
* and make a code path that does not rely on gl_InvocationID.
* implementations that do not supports it, the max_vertices will be multiplied by invocations.
* Your shader needs to account for this fact. Use `#ifdef GPU_ARB_gpu_shader5` and make a code
* path that does not rely on #gl_InvocationID.
*/
Self &geometry_layout(PrimitiveIn prim_in,
PrimitiveOut prim_out,

View File

@ -38,7 +38,7 @@ StringRefNull gpu_shader_dependency_get_source(const StringRefNull source_name);
/**
* \brief Find the name of the file from which the given string was generated.
* \return Return filename or empty string.
* \return filename or empty string.
* \note source_string needs to be identical to the one given by gpu_shader_dependency_get_source()
*/
StringRefNull gpu_shader_dependency_get_filename_from_source_string(

View File

@ -139,7 +139,7 @@ void GLImmediate::end()
GLContext::get()->state_manager->apply_state();
/* We convert the offset in vertex offset from the buffer's start.
* This works because we added some padding to align the first vertex vertex. */
* This works because we added some padding to align the first vertex. */
uint v_first = buffer_offset() / vertex_format.stride;
GLVertArray::update_bindings(
vao_id_, v_first, &vertex_format, reinterpret_cast<Shader *>(shader)->interface);

View File

@ -244,9 +244,9 @@ static int initialize_chain(Object *ob, bPoseChannel *pchan_tip, bConstraint *co
}
if (BLI_listbase_is_empty(&curchan->iktree) == false) {
/* Oh oh, there is already a chain starting from this channel and our chain is longer...
/* Oh, there is already a chain starting from this channel and our chain is longer.
* Should handle this by moving the previous chain up to the beginning of our chain
* For now we just stop here */
* For now we just stop here. */
break;
}
}

View File

@ -1162,7 +1162,7 @@ static int indexer_performance_get_max_gop_size(FFmpegIndexBuilderContext *conte
}
/* Assess scrubbing performance of provided file. This function is not meant to be very exact.
* It compares number number of frames decoded in reasonable time with largest detected GOP size.
* It compares number of frames decoded in reasonable time with largest detected GOP size.
* Because seeking happens in single GOP, it means, that maximum seek time can be detected this
* way.
* Since proxies use GOP size of 10 frames, skip building if detected GOP size is less or

View File

@ -611,7 +611,7 @@ typedef struct FluidDomainSettings {
/* Fluid guiding options. */
float guide_alpha; /* Guiding weight scalar (determines strength). */
int guide_beta; /* Guiding blur radius (affects size of vortices vortices). */
int guide_beta; /* Guiding blur radius (affects size of vortices). */
float guide_vel_factor; /* Multiply guiding velocity by this factor. */
int guide_res[3]; /* Res for velocity guide grids - independent from base res. */
short guide_source;

View File

@ -4904,7 +4904,7 @@ static char *rna_path_token_in_brackets(const char **path,
}
/**
* \return true when when the key in the path is correctly parsed and found in the collection
* \return true when the key in the path is correctly parsed and found in the collection
* or when the path is empty.
*/
static bool rna_path_parse_collection_key(const char **path,

View File

@ -649,7 +649,7 @@ const char *rna_translate_ui_text(const char *text,
struct PropertyRNA *prop,
bool translate);
/* Internal functions that cycles uses so we need to declare (tsk tsk) */
/* Internal functions that cycles uses so we need to declare (tsk!). */
void rna_RenderPass_rect_set(PointerRNA *ptr, const float *values);
#ifdef RNA_RUNTIME

View File

@ -110,7 +110,7 @@ class SocketDeclaration {
/**
* Change the node such that the socket will become visible. The node type's update method
* should be called afterwards.
* \note Note that this is not necessarily implemented for all node types.
* \note this is not necessarily implemented for all node types.
*/
void make_available(bNode &node) const;

View File

@ -16,7 +16,7 @@ struct bContext;
namespace blender::nodes {
/**
* Parameters for the operation operation of adding a node after the link drag search menu closes.
* Parameters for the operation of adding a node after the link drag search menu closes.
*/
class LinkSearchOpParams {
private:

View File

@ -326,7 +326,7 @@ void ntree_update_reroute_nodes(bNodeTree *ntree)
}
/* Propagate socket types from right to left. This affects reroute nodes that haven't been
* changed in the the loop above. */
* changed in the loop above. */
for (bNode *start_node : nodes_linked_with_reroutes) {
LISTBASE_FOREACH (bNodeSocket *, input_socket, &start_node->inputs) {
propagate_reroute_type_from_start_socket(input_socket, links_map, reroute_types);

View File

@ -1918,7 +1918,7 @@ static void RVBlurBitmap2_float(float *map, int width, int height, float blur, i
* I changed the math around to implement an actual Gaussian distribution.
*
* Watch out though, it tends to misbehave with large blur values on
* a small bitmap. Avoid avoid! */
* a small bitmap. Avoid! */
float *temp = NULL, *swap;
float *filter = NULL;

View File

@ -726,7 +726,7 @@ static wmGizmo *gizmo_find_intersected_3d(bContext *C,
* - First, don't use the depth buffer at all, use occlusion queries to detect any gizmos.
* If there are no gizmos or only one - early exit, otherwise.
*
* - Bind the depth buffer and and use selection picking logic.
* - Bind the depth buffer and use selection picking logic.
* This is much slower than occlusion queries (since it's reading depths while drawing).
* When there is a single gizmo under the cursor (quite common), early exit, otherwise.
*