Cleanup: spelling in comments

This commit is contained in:
Campbell Barton
2025-05-11 17:00:47 +10:00
parent 127719fc87
commit 5e75a9c1e8
17 changed files with 36 additions and 29 deletions

View File

@@ -49,7 +49,7 @@ def main():
os.remove(file)
sys.exit(0)
# Find existing rpaths and delete them one by one.
# Find existing RPATHS and delete them one by one.
p = subprocess.run(['otool', '-l', file], capture_output=True)
tokens = p.stdout.split()

View File

@@ -32,18 +32,18 @@ def strip_libs(strip_dir: Path) -> None:
prev_print_len = 0
for shared_lib in strip_dir.rglob("*.so*"):
if shared_lib.suffix == ".py":
# Work around badly named sycl scripts.
# Work around badly named `sycl` scripts.
continue
if shared_lib.is_symlink():
# Don't strip symlinks as we don't want to strip the same library multiple times.
# Don't strip symbolic-links as we don't want to strip the same library multiple times.
continue
prev_print_len = print_strip_lib(shared_lib, prev_print_len)
subprocess.check_call(["strip", "-s", "--enable-deterministic-archives", shared_lib])
for static_lib in strip_dir.rglob("*.a"):
if static_lib.is_symlink():
# Don't strip symlinks as we don't want to strip the same library multiple times.
# Don't strip symbolic-links as we don't want to strip the same library multiple times.
continue
prev_print_len = print_strip_lib(static_lib, prev_print_len)

View File

@@ -134,7 +134,7 @@ class AttributeStorage : public ::AttributeStorage {
void foreach(FunctionRef<void(const Attribute &)> fn) const;
/**
* Try to find the attribute with a givin name. The non-const overload does not make the
* Try to find the attribute with a given name. The non-const overload does not make the
* attribute data itself mutable.
*/
Attribute *lookup(StringRef name);

View File

@@ -90,24 +90,24 @@ class VariableMap {
/**
* Fetch the value of the string variable with the given name.
*
* \return The value if a string variable with that name exists, nullopt
* otherwise.
* \return The value if a string variable with that name exists,
* #std::nullopt otherwise.
*/
std::optional<blender::StringRefNull> get_string(blender::StringRef name) const;
/**
* Fetch the value of the integer variable with the given name.
*
* \return The value if a integer variable with that name exists, nullopt
* otherwise.
* \return The value if a integer variable with that name exists,
* #std::nullopt otherwise.
*/
std::optional<int64_t> get_integer(blender::StringRef name) const;
/**
* Fetch the value of the float variable with the given name.
*
* \return The value if a float variable with that name exists, nullopt
* otherwise.
* \return The value if a float variable with that name exists,
* #std::nullopt otherwise.
*/
std::optional<double> get_float(blender::StringRef name) const;
};

View File

@@ -327,7 +327,7 @@ static int format_float_to_string(const FormatSpecifier &format,
case FormatSpecifierType::NONE: {
/* When no format specification is given, we attempt to replicate Python's
* behavior in the same situation. The only major thing we can't replicate
* via libfmt is that in Python whole numbers are printed with a trailing
* via `libfmt` is that in Python whole numbers are printed with a trailing
* ".0". So we handle that bit manually. */
output_length =
fmt::format_to_n(r_output_string, FORMAT_BUFFER_SIZE - 1, "{}", float_value).size;

View File

@@ -7,7 +7,7 @@
*/
#include "fmt/core.h"
#include <cctype> /* for isdigit. */
#include <cctype> /* For isdigit. */
#include <cerrno>
#include <cstdarg> /* for va_start/end. */
#include <cstddef> /* for offsetof. */

View File

@@ -3373,9 +3373,11 @@ static void do_version_scale_node_remove_translate(bNodeTree *node_tree)
}
}
/* Turns all instances of "{" and "}" in a string into "{{" and "}}", escaping
/**
* Turns all instances of `{` and `}` in a string into `{{` and `}}`, escaping
* them for strings that are processed with templates so that they don't
* erroneously get interepreted as template expressions. */
* erroneously get interpreted as template expressions.
*/
static void version_escape_curly_braces(char string[], const int string_array_length)
{
int bytes_processed = 0;
@@ -3396,10 +3398,12 @@ static void version_escape_curly_braces(char string[], const int string_array_le
}
}
/* Escapes all instances of "{" and "}" in the paths in a compositor node tree's
/**
* Escapes all instances of `{` and `}` in the paths in a compositor node tree's
* File Output nodes.
*
* If the passed node tree is not a compositor node tree, does nothing. */
* If the passed node tree is not a compositor node tree, does nothing.
*/
static void version_escape_curly_braces_in_compositor_file_output_nodes(bNodeTree &nodetree)
{
if (nodetree.type != NTREE_COMPOSIT) {

View File

@@ -107,7 +107,7 @@ enum {
/**
* Parse the next #BHead in the file, increasing the file reader to after the #BHead.
* This automaticaly converts the stored BHead (one of #BHeadType) to the runtime #BHead type.
* This automatically converts the stored BHead (one of #BHeadType) to the runtime #BHead type.
*
* \return The next #BHEad or #std::nullopt if the file is exhausted.
*/

View File

@@ -37,8 +37,8 @@ BlenderHeaderVariant BLO_readfile_blender_header_decode(FileReader *file)
return BlenderHeaderInvalid{};
}
/* If the first 7 bytes are BLENDER, it is very likely that this is a newer version of the
* blendfile format. If the rest of the decode fails, we can still report that this was a Blender
* file of a potentially future version. */
* blend-file format. If the rest of the decode fails, we can still report that this was a
* Blender file of a potentially future version. */
BlenderHeader header;
/* In the old header format, the next bytes indicate the pointer size. In the new format a

View File

@@ -702,7 +702,7 @@ void film_process_data(int2 texel_film, out float4 out_color, out float out_dept
else {
out_depth = imageLoadFast(depth_img, texel_film).r;
if (display_id == -1) {
/* Noop. */
/* NOP. */
}
else if (display_id == normal_id) {
out_color = imageLoadFast(color_accum_img, int3(texel_film, display_id));

View File

@@ -5047,7 +5047,7 @@ static int ui_do_but_TOG(bContext *C, uiBut *but, uiHandleButtonData *data, cons
UI_BTYPE_CHECKBOX,
UI_BTYPE_CHECKBOX_N))
{
/* Support Ctrl-Wheel to cycle toggles and checkboxes. */
/* Support Ctrl-Wheel to cycle toggles and check-boxes. */
button_activate_state(C, but, BUTTON_STATE_EXIT);
return WM_UI_HANDLER_BREAK;
}

View File

@@ -1107,7 +1107,7 @@ static bool region_background_is_transparent(const ScrArea *area, const ARegion
static void region_azone_edge(const ScrArea *area, AZone *az, const ARegion *region)
{
/* Narrow regions like headers need a smaller hitspace that
/* Narrow regions like headers need a smaller hit-space that
* does not interfere with content. */
const bool is_narrow = RGN_TYPE_IS_HEADER_ANY(region->regiontype);
const bool transparent = !is_narrow && region->overlap &&

View File

@@ -1608,7 +1608,7 @@ static void sequencer_preview_draw_overlays(const bContext *C,
if (show_imbuf && (space_sequencer.flag & SEQ_SHOW_OVERLAY)) {
sequencer_draw_borders_overlay(space_sequencer, region.v2d, scene);
/* Various overlays like stirp selection and text editing. */
/* Various overlays like strip selection and text editing. */
preview_draw_all_image_overlays(C, scene, editing, timeline_frame);
if ((space_sequencer.preview_overlay.flag & SEQ_PREVIEW_SHOW_GPENCIL) && space_sequencer.gpd) {

View File

@@ -353,10 +353,11 @@ class Preprocessor {
macro_body = std::regex_replace(macro_body, std::regex(R"(\n)"), " \\\n");
std::string macro_args = get_content_between_balanced_pair(macro_body, '(', ')');
/* Find function arg list. Skip first 10 chars to skip "_TEMPLATE" and the arg list. */
/* Find function argument list.
* Skip first 10 chars to skip "_TEMPLATE" and the argument list. */
std::string fn_args = get_content_between_balanced_pair(
macro_body.substr(10 + macro_args.length() + 1), '(', ')');
/* Remove whitespaces. */
/* Remove white-spaces. */
macro_args = std::regex_replace(macro_args, std::regex(R"(\s)"), "");
std::vector<std::string> macro_args_split = split_string(macro_args, ',');
/* Append arguments inside the function name. */
@@ -385,7 +386,7 @@ class Preprocessor {
/* Only `template ret_t fn<T>(args);` syntax is supported. */
std::regex regex_instance(R"(template \w+ (\w+)<([\w+, \n]+)>\(([\w+ ,\n]+)\);)");
/* Notice the stupid way of keeping the number of lines the same by copying the argument list
* inside a multiline comment. */
* inside a multi-line comment. */
out_str = std::regex_replace(out_str, regex_instance, "$1_TEMPLATE($2)/*$3*/");
}
{

View File

@@ -46,7 +46,7 @@ class NOOPDisplayCPUProcessor : public CPUProcessor {
class BaseDisplayCPUProcessor : public CPUProcessor {
public:
/* Matrix transform which is applied in the linear smace.
/* Matrix transform which is applied in the linear space.
*
* NOTE: The matrix is inversed when the processor is configured to go from display space to
* linear. */

View File

@@ -80,7 +80,7 @@ typedef struct RegionView3D {
*
* \note Besides being above zero, the range of this value is not strictly defined,
* see #ED_view3d_dist_soft_range_get to calculate a working range
* viewport "zoom" functons to use.
* viewport "zoom" functions to use.
*/
float dist;
/** Camera view offsets, 1.0 = viewplane moves entire width/height. */

View File

@@ -78,6 +78,7 @@ dict_custom = {
"canonicalizing",
"catadioptric",
"checksums",
"chromaticity",
"chrominance",
"clearcoat",
"codecs",
@@ -242,6 +243,7 @@ dict_custom = {
"monospaced",
"mutators",
"natively",
"notarizatiom",
"nullable",
"occludee",
"occluder",