Cleanup: spelling in comments

This commit is contained in:
Campbell Barton 2023-08-12 16:29:51 +10:00
parent 4f59b33873
commit 311fa9768d
14 changed files with 32 additions and 28 deletions

View File

@ -89,10 +89,11 @@ GHOST_ContextCGL::GHOST_ContextCGL(bool stereoVisual,
m_metalLayer.allowsNextDrawableTimeout = NO;
/* Enable EDR support. This is done by:
* 1. Using a floating point render target, so that values ouside 0..1 can be used
* 1. Using a floating point render target, so that values outside 0..1 can be used
* 2. Informing the OS that we are EDR aware, and intend to use values outside 0..1
* 3. Setting the extended sRGB color space so that the OS knows how to interpret the
* values. */
* values.
*/
m_metalLayer.wantsExtendedDynamicRangeContent = YES;
m_metalLayer.pixelFormat = METAL_FRAMEBUFFERPIXEL_FORMAT_EDR;
const CFStringRef name = kCGColorSpaceExtendedSRGB;
@ -257,7 +258,7 @@ void GHOST_ContextCGL::metalInit()
texture2d<float> t [[texture(0)]]) {
/* Final blit should ensure alpha is 1.0. This resolves
* rendering artifacts for blitting of final backbuffer. */
* rendering artifacts for blitting of final back-buffer. */
float4 out_tex = t.sample(s, v.texCoord);
out_tex.a = 1.0;
return out_tex;

View File

@ -349,10 +349,11 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(GHOST_SystemCocoa *systemCocoa,
if (type == GHOST_kDrawingContextTypeMetal) {
/* Enable EDR support. This is done by:
* 1. Using a floating point render target, so that values ouside 0..1 can be used
* 1. Using a floating point render target, so that values outside 0..1 can be used
* 2. Informing the OS that we are EDR aware, and intend to use values outside 0..1
* 3. Setting the extended sRGB color space so that the OS knows how to interpret the
* values. */
* values.
*/
m_metalLayer.wantsExtendedDynamicRangeContent = YES;
m_metalLayer.pixelFormat = MTLPixelFormatRGBA16Float;
const CFStringRef name = kCGColorSpaceExtendedSRGB;

View File

@ -40,7 +40,7 @@
//#define DEBUG_MEMCOUNTER
/* Only for debugging:
* Defining DEBUG_BACKTRACE will display a backtrace from where memory block was allocated and
* Defining DEBUG_BACKTRACE will display a back-trace from where memory block was allocated and
* print this trace for all unfreed blocks. This will only work for ASAN enabled builds. This
* option will be on by default for MSVC as it currently does not have LSAN which would normally
* report these leaks, off by default on all other platforms because it would report the leaks

View File

@ -121,7 +121,7 @@ void memory_usage_peak_reset(void);
/**
* Clear the listbase of allocated memory blocks.
*
* WARNING: This will make the whole guardedalloc system fully inconsistent. It is only intented to
* WARNING: This will make the whole guardedalloc system fully inconsistent. It is only indented to
* be called in one place: the destructor of the #MemLeakPrinter class, which is only
* instantiated once as a static variable by #MEM_init_memleak_detection, and therefore destructed
* once at program exit.

View File

@ -3800,7 +3800,7 @@ static IDOverrideLibraryPropertyOperation *liboverride_opop_find_name_lib_iterat
}
}
/* No exact match found, keep cheking the rest of the list of operations. */
/* No exact match found, keep checking the rest of the list of operations. */
}
return nullptr;

View File

@ -706,10 +706,11 @@ void blend_offset_fcurve_segment(FCurve *fcu, FCurveSegment *segment, const floa
static float s_curve(float x, float slope, float width, float height, float xshift, float yshift)
{
/* Formula for 'S' curve we use for the "ease" sliders. The shift values move the curve verticaly
* or horizontaly. The range of the curve used is from 0 to 1 on "x" and "y" so we can scale it
* (width and height) and move it (xshift and y yshift) to crop the part of the curve we need.
* Slope determins how curvy the shape is. */
/* Formula for 'S' curve we use for the "ease" sliders.
* The shift values move the curve vertically or horizontally.
* The range of the curve used is from 0 to 1 on "x" and "y"
* so we can scale it (width and height) and move it (`xshift` and y `yshift`)
* to crop the part of the curve we need. Slope determines how curvy the shape is. */
float y = height * pow((x - xshift), slope) /
(pow((x - xshift), slope) + pow((width - (x - xshift)), slope)) +
yshift;

View File

@ -109,7 +109,7 @@ bool ED_gpencil_layer_frame_select_check(const bGPDlayer *gpl)
return false;
}
/* helper function - select gp-frame based on SELECT_* mode */
/* Helper function: select GP-frame based on SELECT_* mode. */
static void gpencil_frame_select(bGPDframe *gpf, short select_mode)
{
if (gpf == nullptr) {

View File

@ -178,7 +178,7 @@ static bool get_keyframe_extents(bAnimContext *ac, float *min, float *max, const
if (ale->datatype == ALE_GPFRAME) {
bGPDlayer *gpl = static_cast<bGPDlayer *>(ale->data);
/* Find gp-frame which is less than or equal to current-frame. */
/* Find GP-frame which is less than or equal to current-frame. */
LISTBASE_FOREACH (bGPDframe *, gpf, &gpl->frames) {
if (!onlySel || (gpf->flag & GP_FRAME_SELECT)) {
const float framenum = float(gpf->framenum);

View File

@ -462,10 +462,8 @@ static void connect_nodes_to_aovs(const Span<bNodeTreePath *> treepath,
bNodeSocket *aov_socket = nodeFindSocket(aov_node, SOCK_IN, "Color");
if (socket_preview->in_out == SOCK_IN) {
if (socket_preview->link == nullptr) {
/**
* Copy the custom value of the socket directly to the AOV node.
* If the socket does not support custom values, it will justl render black.
*/
/* Copy the custom value of the socket directly to the AOV node.
* If the socket does not support custom values, it will just render black. */
float vec[4] = {0., 0., 0., 1.};
PointerRNA ptr;
switch (socket_preview->type) {

View File

@ -37,17 +37,20 @@
#include "transform_convert.hh"
/* helper struct for gp-frame transforms */
/** Helper struct for GP-frame transforms. */
struct tGPFtransdata {
union {
float val; /* where transdata writes transform */
float loc[3]; /* #td->val and #td->loc share the same pointer. */
/** Where `transdata` writes transform. */
float val;
/** #td->val and #td->loc share the same pointer. */
float loc[3];
};
int *sdata; /* pointer to gpf->framenum */
/** Pointer to `gpf->framenum` */
int *sdata;
};
/* -------------------------------------------------------------------- */
/** \name Grease Pencil Transfrom helpers
/** \name Grease Pencil Transform helpers
* \{ */
static bool grease_pencil_layer_initialize_trans_data(blender::bke::greasepencil::Layer &layer)
@ -60,7 +63,7 @@ static bool grease_pencil_layer_initialize_trans_data(blender::bke::greasepencil
}
/* Make a copy of the current frames in the layer. This map will be changed during the
* transformation, and we need to be able to reset it if the operation is cancelled. */
* transformation, and we need to be able to reset it if the operation is canceled. */
trans_data.frames_copy = layer.frames();
trans_data.frames_duration.clear();
trans_data.frames_destination.clear();

View File

@ -292,7 +292,7 @@ void USDGenericMeshWriter::write_uv_data(const Mesh *mesh,
const blender::StringRef active_ref(active_set_name);
/* Because primvars don't have a notion of "active" for data like
/* Because prim-vars don't have a notion of "active" for data like
* UVs, but a specific UV set may be considered "active" by target
* applications, the [ ---- ] is to name the active set "st". */
const std::string name = active_set_name && (active_ref == attribute_id.name()) ?

View File

@ -346,7 +346,7 @@ typedef enum PropertyOverrideFlag {
/**
* Only use indices to compare items in the property, never names (collections only).
*
* Useful when nameprop of the items is generated from other data
* Useful when #StructRNA::nameproperty of the items is generated from other data
* (e.g. name of material slots is actually name of assigned material).
*/
PROPOVERRIDE_NO_PROP_NAME = (1 << 11),

View File

@ -1017,7 +1017,7 @@ static bool rna_property_override_collection_subitem_name_id_match(
if (do_id_pointer) {
if (*item_id != static_cast<ID *>(ptr_item_name->data)) {
/* If the ID pointer does not match, then there is no match, no need to check the
* name iteself. */
* name itself. */
return is_match;
}
}

View File

@ -1369,7 +1369,7 @@ static void rna_property_override_diff_propptr_validate_diffing(
ptrdiff_ctx.rna_itemname_b = rna_itemname_b;
}
/* Note: This will always assign nullptr to these libpointers in case `do_id_lib` is false,
/* Note: This will always assign nullptr to these lib-pointers in case `do_id_lib` is false,
* which ensures that they will not affect the result of `ptrdiff_ctx.is_valid_for_diffing` in
* the last check below. */
ID *rna_itemid_a = (do_id_pointer && propptr_a->data) ? static_cast<ID *>(propptr_a->data) :