Cleanup: consistent use of back-ticks in code-comments

This commit is contained in:
Campbell Barton
2025-07-23 20:54:26 +10:00
parent 81535a470c
commit 5e3db5fbb0
31 changed files with 80 additions and 71 deletions

View File

@@ -72,7 +72,7 @@ static FT_Error FT_Stream_Open__win32_compat(FT_Stream stream, const char *filep
if (!file) {
fprintf(stderr,
"FT_Stream_Open: "
"could not open `%s'\n",
"could not open '%s'\n",
filepathname);
return FT_THROW(Cannot_Open_Resource);
}
@@ -82,7 +82,7 @@ static FT_Error FT_Stream_Open__win32_compat(FT_Stream stream, const char *filep
if (!stream->size) {
fprintf(stderr,
"FT_Stream_Open: "
"opened `%s' but zero-sized\n",
"opened '%s' but zero-sized\n",
filepathname);
fclose(file);
return FT_THROW(Cannot_Open_Stream);

View File

@@ -451,7 +451,7 @@ struct LibQueryUnusedIDsData {
*
* By default only consider IDs with `0` user count.
* If `do_recursive` is set, it will check dependencies to detect all IDs that are not actually
* used in current file, including 'archipelagos` (i.e. set of IDs referencing each other in
* used in current file, including `archipelagos` (i.e. set of IDs referencing each other in
* loops, but without any 'external' valid usages.
*
* Valid usages here are defined as ref-counting usages, which are not towards embedded or
@@ -473,7 +473,7 @@ void BKE_lib_query_unused_ids_amounts(Main *bmain, LibQueryUnusedIDsData &parame
*
* By default only tag IDs with `0` user count.
* If `do_recursive` is set, it will check dependencies to detect all IDs that are not actually
* used in current file, including 'archipelagos` (i.e. set of IDs referencing each other in
* used in current file, including `archipelagos` (i.e. set of IDs referencing each other in
* loops, but without any 'external' valid usages.
*
* Valid usages here are defined as ref-counting usages, which are not towards embedded or

View File

@@ -150,7 +150,7 @@ class SocketValueVariant {
/**
* Convert the stored value into a single value. For simple value access, this is not necessary,
* because #get` does the conversion implicitly. However, it is necessary if one wants to use
* because #get does the conversion implicitly. However, it is necessary if one wants to use
* #get_single_ptr. Context-dependent fields or grids will just result in a fallback value.
*
* The caller has to make sure that the stored value is a single value, field or grid.

View File

@@ -19,14 +19,14 @@
*
* An example of what step 3 might look like:
*
* ```
* \code{.cc}
* VariableMap template_variables;
* BKE_add_template_variables_general(template_variables, owner_id);
* BKE_add_template_variables_for_render_path(template_variables, scene);
* BKE_add_template_variables_for_node(template_variables, owner_node);
*
* BKE_path_apply_template(filepath, FILE_MAX, template_variables);
* ```
* \endcode
*
* This calls three functions to build the #VariableMap, one for each "kind" of
* variable (see below).
@@ -359,7 +359,7 @@ blender::Vector<blender::bke::path_templates::Error> BKE_path_validate_template(
* This mutates the path in-place. `path` must be a null-terminated string.
*
* The syntax for template expressions is `{variable_name}` or
* {variable_name:format_spec}`. The format specification syntax currently only
* `{variable_name:format_spec}`. The format specification syntax currently only
* applies to numerical values (integer or float), and uses hash symbols (#) to
* indicate the number of digits to print the number with. It can be in any of
* the following forms:

View File

@@ -275,7 +275,7 @@ struct ARegionType {
* performed.
*
* This callback is not called on indirect changes of the current viewport (which could happen
* when the `v2d->tot is changed and `cur` is adopted accordingly).
* when the `v2d->tot` is changed and `cur` is adopted accordingly).
*/
void (*on_view2d_changed)(const bContext *C, ARegion *region);

View File

@@ -570,7 +570,7 @@ static void unpin_file_local_grease_pencil_brush_materials(const ReuseOldBMainDa
}
/**
* Does a complete replacement of data in `new_bmain` by data from `old_bmain. Original new data
* Does a complete replacement of data in `new_bmain` by data from `old_bmain`. Original new data
* are moved to the `old_bmain`, and will be freed together with it.
*
* WARNING: Currently only expects to work on local data, won't work properly if some of the IDs of

View File

@@ -727,8 +727,9 @@ void Drawing::set_texture_matrices(Span<float4x2> matrices, const IndexMask &sel
const double4x3 strokemat4x3 = double4x3(expand_4x2_mat(strokemat));
/*
* We want to solve for `texture_matrix` in the equation: `texspace = texture_matrix *
* strokemat4x3` Because these matrices are not square we can not use a standard inverse.
* We want to solve for `texture_matrix` in the equation:
* `texspace = texture_matrix * strokemat4x3`
* Because these matrices are not square we can not use a standard inverse.
*
* Our problem has the form of: `X = A * Y`
* We can solve for `A` using: `A = X * B`

View File

@@ -516,9 +516,11 @@ static void scene_foreach_toolsettings_id_pointer_process(
}
}
/* Special handling is needed here, as `scene_foreach_toolsettings` (and its dependency
* `scene_foreach_paint`) are also used by `scene_undo_preserve`, where `LibraryForeachIDData
* *data` is nullptr. */
/**
* Special handling is needed here, as `scene_foreach_toolsettings` (and its dependency
* `scene_foreach_paint`) are also used by `scene_undo_preserve`,
* where `LibraryForeachIDData *data` is nullptr.
*/
#define BKE_LIB_FOREACHID_UNDO_PRESERVE_PROCESS_IDSUPER_P( \
_data, _id_p, _do_undo_restore, _action, _reader, _id_old_p, _cb_flag) \
{ \

View File

@@ -14,7 +14,7 @@
* - `v2` = `vec2` = vector 2.
* - `v3` = `vec3` = vector 3.
* - `v4` = `vec4` = vector 4.
* - `vn` = `vec4q = vector N dimensions, *passed as an arg, after the vector*..
* - `vn` = `vec4q` = vector N dimensions, *passed as an arg, after the vector*..
* - `qt` = `quat` = quaternion.
* - `dq` = `dquat` = dual quaternion.
* - `m2` = `mat2` = matrix 2x2.

View File

@@ -92,9 +92,9 @@ size_t BLI_string_replace_range(
* Returning the length of "Foo"
*
* \param left: Where to return copy of part preceding `delim`.
* \param nr: Where to return value of numeric suffix`.
* \param name: String to split`.
* \param delim: Delimiter character`.
* \param nr: Where to return value of numeric suffix.
* \param name: String to split.
* \param delim: Delimiter character.
* \return Length of \a left.
*/
size_t BLI_string_split_name_number(const char *name, char delim, char *r_name_left, int *r_number)

View File

@@ -181,11 +181,11 @@ static RobustInitCaller init_caller;
* The operations Fast_Two_Sum(), Fast_Two_Diff(), Two_Sum(), Two_Diff(),
* Split(), and Two_Product() are all implemented as described in the
* reference. Each of these macros requires certain variables to be
* defined in the calling routine. The variables `bvirt', `c', `abig',
* `_i', `_j', `_k', `_l', `_m', and `_n' are declared `INEXACT' because
* defined in the calling routine. The variables `bvirt`, `c`, `abig`,
* `_i`, `_j`, `_k`, `_l`, `_m`, and `_n` are declared `INEXACT' because
* they store the result of an operation that may incur round-off error.
* The input parameter `x' (or the highest numbered `x_' parameter) must
* also be declared `INEXACT'.
* The input parameter `x` (or the highest numbered `x_` parameter) must
* also be declared `INEXACT`.
*/
#define Fast_Two_Sum_Tail(a, b, x, y) \
@@ -397,20 +397,20 @@ static double iccerrboundA, iccerrboundB, iccerrboundC;
static double isperrboundA, isperrboundB, isperrboundC;
/**
* exactinit() Initialize the variables used for exact arithmetic.
* exactinit() Initialize the variables used for exact arithmetic.
*
* `epsilon' is the largest power of two such that 1.0 + epsilon = 1.0 in
* floating-point arithmetic. `epsilon' bounds the relative round-off
* error. It is used for floating-point error analysis.
* `epsilon` is the largest power of two such that 1.0 + epsilon = 1.0 in
* floating-point arithmetic. `epsilon` bounds the relative round-off
* error. It is used for floating-point error analysis.
*
* `splitter' is used to split floating-point numbers into two half-length
* significant for exact multiplication.
* `splitter` is used to split floating-point numbers into two half-length
* significant for exact multiplication.
*
* I imagine that a highly optimizing compiler might be too smart for its
* own good, and somehow cause this routine to fail, if it pretends that
* floating-point arithmetic is too much like real arithmetic.
* I imagine that a highly optimizing compiler might be too smart for its
* own good, and somehow cause this routine to fail, if it pretends that
* floating-point arithmetic is too much like real arithmetic.
*
* Don't change this routine unless you fully understand it.
* Don't change this routine unless you fully understand it.
*/
void exactinit()
{
@@ -423,7 +423,7 @@ void exactinit()
epsilon = 1.0;
splitter = 1.0;
check = 1.0;
/* Repeatedly divide `epsilon' by two until it is too small to add to
/* Repeatedly divide `epsilon` by two until it is too small to add to
* one without causing round-off. (Also check if the sum is equal to
* the previous sum, for machines that round up instead of using exact
* rounding. Not that this library will work on such machines anyway. */

View File

@@ -318,7 +318,7 @@ void do_versions_after_linking_400(FileData *fd, Main *bmain)
}
}
/* XXX This was added several years ago in 'lib_link` code of Scene... Should be safe enough
/* XXX This was added several years ago in `lib_link` code of Scene... Should be safe enough
* here. */
LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
if (scene->nodetree) {
@@ -326,7 +326,7 @@ void do_versions_after_linking_400(FileData *fd, Main *bmain)
}
}
/* XXX This was added many years ago (1c19940198) in 'lib_link` code of particles as a bug-fix.
/* XXX This was added many years ago (1c19940198) in `lib_link` code of particles as a bug-fix.
* But this is actually versioning. Should be safe enough here. */
LISTBASE_FOREACH (ParticleSettings *, part, &bmain->particles) {
if (!part->effector_weights) {

View File

@@ -501,7 +501,7 @@ void bmo_split_exec(BMesh *bm, BMOperator *op)
[&bm, &dupeop, &splitop]() {
/* Now we make our outputs by copying the dupe output. */
/* NOTE: `boundary_map.out` can't use #BMO_slot_copy` because some of the "source"
/* NOTE: `boundary_map.out` can't use #BMO_slot_copy because some of the "source"
* geometry has been removed. In this case the (source -> destination) map doesn't work.
* In this case there is isn't an especially good option.
* The geometry needs to be included so the boundary is accessible.

View File

@@ -392,8 +392,8 @@ static void render_frame(RenderEngine *engine,
/* Render the gpencil object and merge the result to the underlying render. */
inst.draw(manager);
/* Weight of this render SSAA sample. The sum of previous samples is weighted by `1 -
* weight`. This diminishes after each new sample as we want all samples to be equally
/* Weight of this render SSAA sample. The sum of previous samples is weighted by
* `1 - weight`. This diminishes after each new sample as we want all samples to be equally
* weighted inside the final result (inside the combined buffer). This weighting scheme
* allows to always store the resolved result making it ready for in-progress display or
* read-back. */

View File

@@ -251,7 +251,7 @@ blender::gpu::Batch *DRW_mesh_batch_cache_get_wireframes_face(Mesh &mesh);
* Creates the #blender::gpu::Batch for drawing the UV Stretching Area Overlay.
* Optional retrieves the total area or total uv area of the mesh.
*
* The `cache->tot_area` and cache->tot_uv_area` update are calculation are
* The `cache->tot_area` and `cache->tot_uv_area` update are calculation are
* only valid after calling `DRW_mesh_batch_cache_create_requested`.
*/
blender::gpu::Batch *DRW_mesh_batch_cache_get_edituv_faces_stretch_area(Object &object,

View File

@@ -29,9 +29,9 @@ void asset_reading_region_listen_fn(const wmRegionListenerParams *params);
* Get the asset library being read into an asset-list and identified using \a library_reference.
*
* \note The asset library may be allocated and loaded asynchronously, so it's not available right
* after fetching, and this function will return null. The asset list code sends `NC_ASSET |
* ND_ASSET_LIST_READING` notifiers until loading is done, they can be used to continuously
* call this function to retrieve the asset library once available.
* after fetching, and this function will return null. The asset list code sends
* `NC_ASSET | ND_ASSET_LIST_READING` notifiers until loading is done, they can be used
* to continuously call this function to retrieve the asset library once available.
*/
asset_system::AssetLibrary *library_get_once_available(
const AssetLibraryReference &library_reference);

View File

@@ -2080,10 +2080,13 @@ struct FileListReadJob {
Main *current_main = nullptr;
FileList *filelist = nullptr;
/** The path currently being read, relative to the filelist root directory. Needed for recursive
* reading. The full file path is then composed like: `<filelist root>/<cur_relbase>/<file name>.
/**
* The path currently being read, relative to the filelist root directory.
* Needed for recursive reading. The full file path is then composed like:
* `<filelist root>/<cur_relbase>/<file name>`.
* (whereby the file name may also be a library path within a .blend, e.g.
* `Materials/Material.001`). */
* `Materials/Material.001`).
*/
char cur_relbase[FILE_MAX_LIBEXTRA] = "";
/** The current asset library to load. Usually the same as #FileList.asset_library, however

View File

@@ -249,7 +249,7 @@ TreeElement *AbstractTreeDisplay::add_element(ListBase *lb,
* on file read. */
/* FIXME: This is may be an arbitrary void pointer that is cast to an ID pointer. Could be a
* temporary stack pointer even. Often works reliably enough at runtime, and file reading handles
* cases where data can't be reconstructed just fine (pointer is null`ed). This is still
* cases where data can't be reconstructed just fine (pointer is null'ed). This is still
* completely type unsafe and error-prone. */
ID *persistent_dataptr = owner_id ? owner_id : static_cast<ID *>(create_data);

View File

@@ -910,8 +910,8 @@ static Mesh *mesh_boolean_mesh_arr(Span<const Mesh *> meshes,
#define BM_FACE_TAG BM_ELEM_DRAW
/**
* Function use to say what operand a face is part of, based on the `BM_FACE_TAG`,`
* which is set in `bm_mesh_create`.
* Function use to say what operand a face is part of, based on the `BM_FACE_TAG`
* which is set in `bm_mesh_create`.
*/
static int face_boolean_operand(BMFace *f, void * /*user_data*/)
{

View File

@@ -850,7 +850,7 @@ class Preprocessor {
std::string preprocessor_directive_mutation(const std::string &str)
{
/* Remove unsupported directives.` */
/* Remove unsupported directives. */
std::regex regex(R"(#\s*(?:include|pragma once|pragma runtime_generated)[^\n]*)");
return std::regex_replace(str, regex, "");
}

View File

@@ -201,7 +201,7 @@ struct VKRenderGraphNode {
* Build commands for this node and record them in the given command_buffer.
*
* NOTE: Pipeline barriers should already be added. See
* `VKCommandBuilder::build_node` and `VKCommandBuilder::build_pipeline_barriers.
* `VKCommandBuilder::build_node` and `VKCommandBuilder::build_pipeline_barriers`.
*/
void build_commands(VKCommandBufferInterface &command_buffer,
VKRenderGraphStorage &storage,

View File

@@ -36,9 +36,10 @@ class VKRenderGraph;
* eventually not been displayed on screen. These branches should be pruned. The challenge is
* that we need to know for certain that it isn't used in a not submitted part of the graph.
*
* TODO: Walking the render graph isn't implemented yet. The idea is to have a
* `Map<ResourceWithStamp, Vector<NodeHandle>> consumers` and `Map<ResourceWithStamp, NodeHandle>
* producers`. These attributes can be stored in the render graph and created when building the
* TODO: Walking the render graph isn't implemented yet.
* The idea is to have a `Map<ResourceWithStamp, Vector<NodeHandle>> consumers` and
* `Map<ResourceWithStamp, NodeHandle> producers`.
* These attributes can be stored in the render graph and created when building the
* links, or can be created inside the VKScheduler as a variable. The exact detail which one would
* be better is unclear as there aren't any users yet. At the moment the scheduler would need them
* we need to figure out the best way to store and retrieve the consumers/producers.

View File

@@ -779,11 +779,13 @@ typedef struct bAction {
/** ID-serialization for relinking. */
ID id;
struct ActionLayer **layer_array; /* Array of 'layer_array_num' layers. */
/** Array of `layer_array_num` layers. */
struct ActionLayer **layer_array;
int layer_array_num;
int layer_active_index; /* Index into layer_array, -1 means 'no active'. */
struct ActionSlot **slot_array; /* Array of 'slot_array_num` slots. */
/** Array of `slot_array_num` slots. */
struct ActionSlot **slot_array;
int slot_array_num;
int32_t last_slot_handle;

View File

@@ -184,11 +184,11 @@ typedef struct ViewLayer {
struct FreestyleConfig freestyle_config;
struct ViewLayerEEVEE eevee;
/* List containing the `ViewLayerAOV`s */
/** List containing #ViewLayerAOV. */
ListBase aovs;
ViewLayerAOV *active_aov;
/* List containing the 'ViewLayerLightgroup`s */
/** List containing #ViewLayerLightgroup. */
ListBase lightgroups;
ViewLayerLightgroup *active_lightgroup;

View File

@@ -2771,7 +2771,7 @@ typedef enum GreasePencilTintModifierFlag {
typedef struct GreasePencilSmoothModifierData {
ModifierData modifier;
GreasePencilModifierInfluenceData influence;
/** `eGreasePencilSmooth_Flag. */
/** #eGreasePencilSmooth_Flag. */
int flag;
/** Factor of smooth. */
float factor;

View File

@@ -3758,9 +3758,9 @@ std::string RNA_property_string_get(PointerRNA *ptr, PropertyRNA *prop)
}
std::string string_ret{};
/* Note: after `resize()` the underlying buffer is actually at least `length +
* 1` bytes long, because (since C++11) `std::string` guarantees a terminating
* null byte, but that is not considered part of the length. */
/* Note: after `resize()` the underlying buffer is actually at least
* `length + 1` bytes long, because (since C++11) `std::string` guarantees
* a terminating null byte, but that is not considered part of the length. */
string_ret.resize(length);
if (sprop->get) {

View File

@@ -417,7 +417,7 @@ static PyObject *pygpu_batch_draw_instanced(BPyGPUBatch *self, PyObject *args, P
"O!" /* `program` */
"|$" /* Optional keyword only arguments. */
"i" /* `instance_start` */
"i" /* `instance_count' */
"i" /* `instance_count` */
":GPUBatch.draw_instanced",
_keywords,
nullptr,
@@ -461,8 +461,8 @@ static PyObject *pygpu_batch_draw_range(BPyGPUBatch *self, PyObject *args, PyObj
PY_ARG_PARSER_HEAD_COMPAT()
"O!" /* `program` */
"|$" /* Optional keyword only arguments. */
"i" /* `elem_start' */
"i" /* `elem_count' */
"i" /* `elem_start` */
"i" /* `elem_count` */
":GPUBatch.draw_range",
_keywords,
nullptr,

View File

@@ -798,8 +798,8 @@ static PyMethodDef pygpu_framebuffer__tp_methods[] = {
# endif
#endif
/* Ideally type aliases would de-duplicate: `blender::gpu::Texture | dict[str, int |
* blender::gpu::Texture]` in this doc-string. */
/* Ideally type aliases would de-duplicate:
* `blender::gpu::Texture | dict[str, int | blender::gpu::Texture]` in this doc-string. */
PyDoc_STRVAR(
/* Wrap. */
pygpu_framebuffer__tp_doc,

View File

@@ -2273,7 +2273,7 @@ static StructRNA *bpy_prop_deferred_data_or_srna(PyObject *self,
self = PyTuple_GET_ITEM(args, 0);
args = PyTuple_New(0);
/* This will be #BPy_BoolProperty` or one of the functions that define a type. */
/* This will be #BPy_BoolProperty or one of the functions that define a type. */
PyCFunctionWithKeywords method_fn = (PyCFunctionWithKeywords)(void *)method_def->ml_meth;
*r_deferred_result = method_fn(self, args, kw);
Py_DECREF(args);

View File

@@ -83,7 +83,7 @@ static int parse_syntax_error(PyObject *err,
*message = nullptr;
*filename = nullptr;
/* new style errors. `err' is an instance */
/* New style errors. `err` is an instance. */
*message = _PyObject_GetAttrId(err, &PyId_msg);
if (!*message) {
goto finally;

View File

@@ -993,8 +993,8 @@ enum wmPopupPosition {
* Communication/status data owned by the wmJob, and passed to the worker code when calling
* `startjob` callback.
*
* 'OUTPUT' members mean that they are defined by the worker thread, and read/used by the wmJob
* management code from the main thread. And vice-versa for `INPUT' members.
* `OUTPUT` members mean that they are defined by the worker thread, and read/used by the wmJob
* management code from the main thread. And vice-versa for `INPUT` members.
*
* \warning There is currently no thread-safety or synchronization when accessing these values.
* This is fine as long as: