[Bf-blender-cvs] [add1b6ab3c9] master: Cleanup: spelling in comments
Campbell Barton
noreply at git.blender.org
Fri Sep 23 06:35:29 CEST 2022
Commit: add1b6ab3c91d408635b311127224dd4cc33f1ab
Author: Campbell Barton
Date: Fri Sep 23 14:33:43 2022 +1000
Branches: master
https://developer.blender.org/rBadd1b6ab3c91d408635b311127224dd4cc33f1ab
Cleanup: spelling in comments
===================================================================
M intern/ghost/intern/GHOST_ContextCGL.h
M intern/ghost/intern/GHOST_ContextCGL.mm
M intern/ghost/intern/GHOST_Window.h
M intern/mikktspace/mikk_util.hh
M source/blender/blenlib/intern/string_search.cc
M source/blender/depsgraph/intern/builder/deg_builder_rna.cc
M source/blender/editors/interface/interface_widgets.c
M source/blender/editors/space_file/filelist.cc
M source/blender/editors/space_file/folder_history.cc
M source/blender/gpu/intern/gpu_codegen.cc
M source/blender/gpu/intern/gpu_material.c
M source/blender/gpu/metal/mtl_context.hh
M source/blender/gpu/metal/mtl_context.mm
M source/blender/gpu/metal/mtl_immediate.mm
M source/blender/gpu/metal/mtl_texture.mm
M source/blender/gpu/metal/mtl_vertex_buffer.hh
M source/blender/gpu/metal/mtl_vertex_buffer.mm
M source/blender/imbuf/intern/dds/ColorBlock.h
M source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
M source/blender/imbuf/intern/openexr/openexr_api.cpp
M source/blender/python/gpu/gpu_py_shader_create_info.cc
M source/blender/python/mathutils/mathutils_Vector.c
M source/blender/windowmanager/intern/wm_event_system.cc
===================================================================
diff --git a/intern/ghost/intern/GHOST_ContextCGL.h b/intern/ghost/intern/GHOST_ContextCGL.h
index 5caabb8ce00..130b926f25c 100644
--- a/intern/ghost/intern/GHOST_ContextCGL.h
+++ b/intern/ghost/intern/GHOST_ContextCGL.h
@@ -93,7 +93,7 @@ class GHOST_ContextCGL : public GHOST_Context {
/**
* Returns a texture that Metal code can use as a render target. The current
- * contents of this texture will be composited on top of the framebuffer
+ * contents of this texture will be composited on top of the frame-buffer
* each time `swapBuffers` is called.
*/
id<MTLTexture> metalOverlayTexture();
@@ -134,7 +134,7 @@ class GHOST_ContextCGL : public GHOST_Context {
/** The virtualized default frame-buffer. */
unsigned int m_defaultFramebuffer;
- /** The virtualized default framebuffer's texture */
+ /** The virtualized default frame-buffer's texture. */
/**
* Texture that you can render into with Metal. The texture will be
* composited on top of `m_defaultFramebufferMetalTexture` whenever
diff --git a/intern/ghost/intern/GHOST_ContextCGL.mm b/intern/ghost/intern/GHOST_ContextCGL.mm
index 6a0fed79fb0..ff53ecdbbba 100644
--- a/intern/ghost/intern/GHOST_ContextCGL.mm
+++ b/intern/ghost/intern/GHOST_ContextCGL.mm
@@ -57,7 +57,7 @@ GHOST_ContextCGL::GHOST_ContextCGL(bool stereoVisual,
m_defaultFramebuffer(0),
m_debug(false)
{
- /* Init Metal Swapchain. */
+ /* Initialize Metal Swap-chain. */
current_swapchain_index = 0;
for (int i = 0; i < METAL_SWAPCHAIN_SIZE; i++) {
m_defaultFramebufferMetalTexture[i].texture = nil;
@@ -94,7 +94,7 @@ GHOST_ContextCGL::GHOST_ContextCGL(bool stereoVisual,
}
}
- /* Initialise swapinterval. */
+ /* Initialize swap-interval. */
mtl_SwapInterval = 60;
}
@@ -302,7 +302,7 @@ GHOST_TSuccess GHOST_ContextCGL::updateDrawingContext()
id<MTLTexture> GHOST_ContextCGL::metalOverlayTexture()
{
- /* Increment Swapchain - Only needed if context is requesting a new texture */
+ /* Increment Swap-chain - Only needed if context is requesting a new texture */
current_swapchain_index = (current_swapchain_index + 1) % METAL_SWAPCHAIN_SIZE;
/* Ensure backing texture is ready for current swapchain index */
@@ -409,7 +409,7 @@ GHOST_TSuccess GHOST_ContextCGL::initializeDrawingContext()
pixelFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:&attribs[0]];
if (pixelFormat == nil) {
/* If pixel format creation fails when testing increased sampler limit,
- * attempt intialisation again with feature disabled, otherwise, fail. */
+ * attempt initialization again with feature disabled, otherwise, fail. */
if (increasedSamplerLimit) {
increasedSamplerLimit = false;
continue;
@@ -594,7 +594,7 @@ void GHOST_ContextCGL::metalInit()
}
/* Create a render pipeline to composite things rendered with Metal on top
- * of the framebuffer contents. Uses the same vertex and fragment shader
+ * of the frame-buffer contents. Uses the same vertex and fragment shader
* as the blit above, but with alpha blending enabled. */
desc.label = @"Metal Overlay";
desc.colorAttachments[0].blendingEnabled = YES;
diff --git a/intern/ghost/intern/GHOST_Window.h b/intern/ghost/intern/GHOST_Window.h
index 8e1f73d3430..1c0991bba30 100644
--- a/intern/ghost/intern/GHOST_Window.h
+++ b/intern/ghost/intern/GHOST_Window.h
@@ -258,8 +258,8 @@ class GHOST_Window : public GHOST_IWindow {
GHOST_Context *getContext();
/**
- * Gets the OpenGL framebuffer associated with the window's contents.
- * \return The ID of an OpenGL framebuffer object.
+ * Gets the OpenGL frame-buffer associated with the window's contents.
+ * \return The ID of an OpenGL frame-buffer object.
*/
virtual unsigned int getDefaultFramebuffer() override;
diff --git a/intern/mikktspace/mikk_util.hh b/intern/mikktspace/mikk_util.hh
index 857ca95910b..4064d2af617 100644
--- a/intern/mikktspace/mikk_util.hh
+++ b/intern/mikktspace/mikk_util.hh
@@ -139,8 +139,8 @@ void radixsort(std::vector<T> &data, std::vector<T> &data2, KeyGetter getKey)
static void float_add_atomic(float *val, float add)
{
- /* Hacky, but atomic floats are only supported from C++20 onwards.
- * This works in practise since std::atomic<uint32_t> is really just an uint32_t in memory,
+ /* Hacky, but atomic floats are only supported from C++20 onward.
+ * This works in practice since `std::atomic<uint32_t>` is really just an `uint32_t` in memory,
* so this cast lets us do a 32-bit CAS operation (which is used to build the atomic float
* operation) without needing any external libraries or compiler-specific builtins. */
std::atomic<uint32_t> *atomic_val = reinterpret_cast<std::atomic<uint32_t> *>(val);
diff --git a/source/blender/blenlib/intern/string_search.cc b/source/blender/blenlib/intern/string_search.cc
index 31ea24eb494..96e2ad33619 100644
--- a/source/blender/blenlib/intern/string_search.cc
+++ b/source/blender/blenlib/intern/string_search.cc
@@ -458,7 +458,7 @@ int BLI_string_search_query(StringSearch *search, const char *query, void ***r_d
if (score == found_scores[0] && !query_str.is_empty()) {
/* Sort items with best score by length. Shorter items are more likely the ones you are
* looking for. This also ensures that exact matches will be at the top, even if the query is
- * a substring of another item. */
+ * a sub-string of another item. */
std::sort(indices.begin(), indices.end(), [&](int a, int b) {
return search->items[a].length < search->items[b].length;
});
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_rna.cc b/source/blender/depsgraph/intern/builder/deg_builder_rna.cc
index d94746fb7fa..1a4356c4a92 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_rna.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_rna.cc
@@ -138,8 +138,8 @@ bool RNANodeQuery::contains(const char *prop_identifier, const char *rna_path_co
return false;
}
- /* If substr != prop_identifier, it means that the substring is found further in prop_identifier,
- * and that thus index -1 is a valid memory location. */
+ /* If `substr != prop_identifier`, it means that the sub-string is found further in
+ * `prop_identifier`, and that thus index -1 is a valid memory location. */
const bool start_ok = substr == prop_identifier || substr[-1] == '.';
if (!start_ok) {
return false;
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 53b1967d668..842201894a3 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -197,16 +197,16 @@ static void color_mul_hsl_v3(uchar ch[3], float h_factor, float s_factor, float
* \{ */
/**
- * - in: roundbox codes for corner types and radius
- * - return: array of `[size][2][x, y]` points, the edges of the roundbox, + UV coords
+ * - in: `roundbox` codes for corner types and radius
+ * - return: array of `[size][2][x, y]` points, the edges of the `roundbox`, + UV coords
*
- * - draw black box with alpha 0 on exact button boundbox
- * - for every AA step:
+ * - Draw black box with alpha 0 on exact button bounding-box.
+ * - For every AA step:
* - draw the inner part for a round filled box, with color blend codes or texture coords
* - draw outline in outline color
* - draw outer part, bottom half, extruded 1 pixel to bottom, for emboss shadow
* - draw extra decorations
- * - draw background color box with alpha 1 on exact button boundbox
+ * - Draw background color box with alpha 1 on exact button bounding-box.
*/
/* fill this struct with polygon info to draw AA'ed */
@@ -693,7 +693,7 @@ static void round_box__edges(
{
float vec[WIDGET_CURVE_RESOLU][2], veci[WIDGET_CURVE_RESOLU][2];
const float minx = rect->xmin, miny = rect->ymin, maxx = rect->xmax, maxy = rect->ymax;
- const float minxi = minx + U.pixelsize; /* boundbox inner */
+ const float minxi = minx + U.pixelsize; /* Bounding-box inner. */
const float maxxi = maxx - U.pixelsize;
const float minyi = miny + U.pixelsize;
const float maxyi = maxy - U.pixelsize;
diff --git a/source/blender/editors/space_file/filelist.cc b/source/blender/editors/space_file/filelist.cc
index 2b9b23620ee..daf04aa5f41 100644
--- a/source/blender/editors/space_file/filelist.cc
+++ b/source/blender/editors/space_file/filelist.cc
@@ -227,7 +227,7 @@ struct FileList {
* because those are no more persistent
* (only generated on demand, and freed as soon as possible).
* Persistent part (mere list of paths + stat info)
- * is kept as small as possible, and filebrowser-agnostic.
+ * is kept as small as possible, and file-browser agnostic.
*/
GHash *selection_state;
diff --git a/source/blender/editors/space_file/folder_history.cc b/source/blender/editors/space_file/folder_history.cc
index 9aa1d181584..3e410901347 100644
--- a/source/blender/editors/space_file/folder_history.cc
+++ b/source/blender/editors/space_file/folder_history.cc
@@ -23,7 +23,9 @@
#include "file_intern.h"
-/* ----------------- FOLDERLIST (previous/next) -------------- */
+/* -------------------------------------------------------------------- */
+/** \name FOLDERLIST (previous/next)
+ * \{ */
typedef struct FolderList {
struct FolderList *next, *prev;
@@ -47,7 +49,7 @@ void folderlist_popdir(struct ListBase *folderlist, char *dir)
BLI_strncpy(dir, prev_dir, FILE_MAXDIR);
}
}
- /* delete the folder next or use setdir directly before PREVIOUS OP */
+ /* Delete the folder next or use set-directory directly before PREVIOUS OP. */
}
void folderlist_pushdir(ListBase *folderlist, const char *dir)
@@ -129,7 +131,11 @@ static ListBase folderlist_duplicate(ListBase *folderlist)
return folderlistn;
}
-/* ----------------- Folder-History (wraps/owns file list above) -------------- */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Folder-History (wraps/owns file list above)
+ * \{ */
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list