From ad87bf3dc7ccc04176e2c820dfcd680471c653d3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 23 May 2023 11:47:17 +1000 Subject: [PATCH] Cleanup: spelling, wording improvements --- source/blender/blenkernel/BKE_main.h | 20 +++++++++++--------- source/blender/geometry/intern/uv_pack.cc | 2 +- source/blender/gpu/metal/mtl_texture.mm | 2 +- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/source/blender/blenkernel/BKE_main.h b/source/blender/blenkernel/BKE_main.h index 8df2d6d534f..2bef22819ff 100644 --- a/source/blender/blenkernel/BKE_main.h +++ b/source/blender/blenkernel/BKE_main.h @@ -38,14 +38,16 @@ struct Library; struct MainLock; struct UniqueName_Map; -/* Blender thumbnail, as written on file (width, height, and data as char RGBA). */ -/* We pack pixel data after that struct. */ +/** + * Blender thumbnail, as written to the `.blend` file (width, height, and data as char RGBA). + */ typedef struct BlendThumbnail { int width, height; + /** Pixel data, RGBA (repeated): `sizeof(char[4]) * width * height`. */ char rect[0]; } BlendThumbnail; -/* Structs caching relations between data-blocks in a given Main. */ +/** Structs caching relations between data-blocks in a given Main. */ typedef struct MainIDRelationsEntryItem { struct MainIDRelationsEntryItem *next; @@ -123,10 +125,10 @@ typedef struct Main { /** * The file-path of this blend file, an empty string indicates an unsaved file. * - * \note For the current loaded blend file this path should be absolute & normalized - * to prevent redundant leading slashes or current-working-directory relative paths - * from causing problems with absolute/relative patch conversion that relies on this being - * an absolute path. See #BLI_path_canonicalize_native. + * \note For the current loaded blend file this path must be absolute & normalized. + * This prevents redundant leading slashes or current-working-directory relative paths + * from causing problems with absolute/relative conversion which relies on this `filepath` + * being absolute. See #BLI_path_canonicalize_native. * * This rule is not strictly enforced as in some cases loading a #Main is performed * to read data temporarily (preferences & startup) for e.g. @@ -230,10 +232,10 @@ typedef struct Main { */ struct MainIDRelations *relations; - /* IDMap of IDs. Currently used when reading (expanding) libraries. */ + /** IDMap of IDs. Currently used when reading (expanding) libraries. */ struct IDNameLib_Map *id_map; - /* Used for efficient calculations of unique names. */ + /** Used for efficient calculations of unique names. */ struct UniqueName_Map *name_map; struct MainLock *lock; diff --git a/source/blender/geometry/intern/uv_pack.cc b/source/blender/geometry/intern/uv_pack.cc index 992f07bcb8a..4c9b932091a 100644 --- a/source/blender/geometry/intern/uv_pack.cc +++ b/source/blender/geometry/intern/uv_pack.cc @@ -102,7 +102,7 @@ static float get_aspect_scaled_extent(const rctf &extent, const UVPackIsland_Par } /** - * \return true iff `b` is a preferred layout over `a`, given the packing parameters supplied. + * \return true if `b` is a preferred layout over `a`, given the packing parameters supplied. */ static bool is_larger(const rctf &a, const rctf &b, const UVPackIsland_Params ¶ms) { diff --git a/source/blender/gpu/metal/mtl_texture.mm b/source/blender/gpu/metal/mtl_texture.mm index 80093d55240..f0b5f146b70 100644 --- a/source/blender/gpu/metal/mtl_texture.mm +++ b/source/blender/gpu/metal/mtl_texture.mm @@ -176,7 +176,7 @@ void gpu::MTLTexture::bake_mip_swizzle_view() } } - /* Note: Texture type for cube maps can be overriden as a 2D array. This is done + /* Note: Texture type for cube maps can be overridden as a 2D array. This is done * via modifying this textures type flags. */ MTLTextureType texture_view_texture_type = to_metal_type(type_);