diff options
author | Campbell Barton <campbell@blender.org> | 2022-08-19 06:49:13 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-08-19 06:49:13 +0300 |
commit | 1a3bc09e893308cb6d31640856d23006fac56292 (patch) | |
tree | e9c3e2701b2350c8b84fc94f9585a9cc3921c0e8 | |
parent | 2a15040777a04170a00c3591065b8243e40428d5 (diff) |
Cleanup: spelling in comments
8 files changed, 27 insertions, 22 deletions
diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c index f758c67be43..bc404325fc7 100644 --- a/source/blender/blenfont/intern/blf_glyph.c +++ b/source/blender/blenfont/intern/blf_glyph.c @@ -42,9 +42,11 @@ #include "BLI_strict_flags.h" #include "BLI_string_utf8.h" -/* Convert glyph converage amounts to lightness values. Uses a LUT that perceptually improves +/** + * Convert glyph coverage amounts to lightness values. Uses a LUT that perceptually improves * anti-aliasing and results in text that looks a bit fuller and slightly brighter. This should - * be reconsidered in some - or all - cases when we transform the entire UI. */ + * be reconsidered in some - or all - cases when we transform the entire UI. + */ #define BLF_GAMMA_CORRECT_GLYPHS /* -------------------------------------------------------------------- */ @@ -190,19 +192,20 @@ static GlyphBLF *blf_glyph_cache_find_glyph(GlyphCacheBLF *gc, uint charcode) #ifdef BLF_GAMMA_CORRECT_GLYPHS -/* Gamma correction of glyph converage values with widely-recommended gamma of 1.43. +/** + * Gamma correction of glyph coverage values with widely-recommended gamma of 1.43. * "The reasons are historical. Because so many programmers have neglected gamma blending for so * long, people who have created fonts have tried to work around the problem of fonts looking too - * thin by just making the fonts thicker! Obviously it doesn’t help the jaggedness, but it does + * thin by just making the fonts thicker! Obviously it doesn't help the jaggedness, but it does * make them look the proper weight, as originally intended. The obvious problem with this is * that if we want to gamma blend correctly many older fonts will look wrong. So we compromise, - * and use a lower gamma value, so we get a bit better antialiasing, but the fonts don’t look too + * and use a lower gamma value, so we get a bit better anti-aliasing, but the fonts don't look too * heavy." * https://www.puredevsoftware.com/blog/2019/01/22/sub-pixel-gamma-correct-font-rendering/ */ static char blf_glyph_gamma(char c) { - /* The following is (char)(powf(c / 256.0f, 1.0f / 1.43f) * 256.0f). */ + /* The following is `(char)(powf(c / 256.0f, 1.0f / 1.43f) * 256.0f)`. */ static const char gamma[256] = { 0, 5, 9, 11, 14, 16, 19, 21, 23, 25, 26, 28, 30, 32, 34, 35, 37, 38, 40, 41, 43, 44, 46, 47, 49, 50, 52, 53, 54, 56, 57, 58, 60, 61, 62, 64, diff --git a/source/blender/blenkernel/BKE_outliner_treehash.hh b/source/blender/blenkernel/BKE_outliner_treehash.hh index f72cec21dbc..b5226f7ed50 100644 --- a/source/blender/blenkernel/BKE_outliner_treehash.hh +++ b/source/blender/blenkernel/BKE_outliner_treehash.hh @@ -26,23 +26,24 @@ class TreeHash { public: ~TreeHash(); - /* create and fill hashtable with treestore elements */ + /** Create and fill hash-table with treestore elements */ static std::unique_ptr<TreeHash> create_from_treestore(BLI_mempool &treestore); - /* full rebuild for already allocated hashtable */ + /** Full rebuild for already allocated hash-table. */ void rebuild_from_treestore(BLI_mempool &treestore); - /* clear element usage flags */ + /** Clear element usage flags. */ void clear_used(); - /* Add/remove hashtable elements */ + /** Add hash-table element. */ void add_element(TreeStoreElem &elem); + /** Remove hash-table element. */ void remove_element(TreeStoreElem &elem); - /* find first unused element with specific type, nr and id */ + /** Find first unused element with specific type, nr and id. */ TreeStoreElem *lookup_unused(short type, short nr, ID *id) const; - /* find user or unused element with specific type, nr and id */ + /** Find user or unused element with specific type, nr and id. */ TreeStoreElem *lookup_any(short type, short nr, ID *id) const; private: diff --git a/source/blender/blenkernel/intern/outliner_treehash.cc b/source/blender/blenkernel/intern/outliner_treehash.cc index 5d13894c265..e832240fe90 100644 --- a/source/blender/blenkernel/intern/outliner_treehash.cc +++ b/source/blender/blenkernel/intern/outliner_treehash.cc @@ -39,9 +39,11 @@ class TseGroup { /* Only allow reset of #TseGroup.lastused counter to 0 once every 1k search. */ #define TSEGROUP_LASTUSED_RESET_VALUE 10000 -/* Allocate structure for TreeStoreElements; +/** + Allocate structure for TreeStoreElements; * Most of elements in treestore have no duplicates, - * so there is no need to preallocate memory for more than one pointer */ + * so there is no need to pre-allocate memory for more than one pointer. + */ static TseGroup *tse_group_create(void) { TseGroup *tse_group = MEM_new<TseGroup>("TseGroup"); diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index d9eeed94868..8c5662be2be 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -3406,9 +3406,8 @@ static size_t animdata_filter_remove_duplis(ListBase *anim_data) GSet *gs; size_t items = 0; - /* build new hashtable to efficiently store and retrieve which entries have been - * encountered already while searching - */ + /* Build new hash-table to efficiently store and retrieve which entries have been + * encountered already while searching. */ gs = BLI_gset_ptr_new(__func__); /* loop through items, removing them from the list if a similar item occurs already */ diff --git a/source/blender/freestyle/intern/geometry/FastGrid.h b/source/blender/freestyle/intern/geometry/FastGrid.h index 3d9ec6a64ca..b835e109faa 100644 --- a/source/blender/freestyle/intern/geometry/FastGrid.h +++ b/source/blender/freestyle/intern/geometry/FastGrid.h @@ -12,7 +12,7 @@ namespace Freestyle { /** Class to define a regular grid used for ray casting computations - * We don't use a hashtable here. The grid is explicitly stored for faster computations. + * We don't use a hash-table here. The grid is explicitly stored for faster computations. * However, this might result in significant increase in memory usage * (compared to the regular grid). */ @@ -31,7 +31,7 @@ class FastGrid : public Grid { /** * clears the grid - * Deletes all the cells, clears the hashtable, resets size, size of cell, number of cells. + * Deletes all the cells, clears the hash-table, resets size, size of cell, number of cells. */ virtual void clear(); diff --git a/source/blender/freestyle/intern/geometry/Grid.h b/source/blender/freestyle/intern/geometry/Grid.h index c25594e620f..d66982eef52 100644 --- a/source/blender/freestyle/intern/geometry/Grid.h +++ b/source/blender/freestyle/intern/geometry/Grid.h @@ -187,7 +187,7 @@ class Grid { } /** clears the grid - * Deletes all the cells, clears the hashtable, resets size, size of cell, number of cells. + * Deletes all the cells, clears the hash-table, resets size, size of cell, number of cells. */ virtual void clear(); diff --git a/source/blender/freestyle/intern/geometry/HashGrid.h b/source/blender/freestyle/intern/geometry/HashGrid.h index b08334d3474..18eeb579d07 100644 --- a/source/blender/freestyle/intern/geometry/HashGrid.h +++ b/source/blender/freestyle/intern/geometry/HashGrid.h @@ -52,7 +52,7 @@ class HashGrid : public Grid { } /** clears the grid - * Deletes all the cells, clears the hashtable, resets size, size of cell, number of cells. + * Deletes all the cells, clears the hash-table, resets size, size of cell, number of cells. */ virtual void clear(); diff --git a/source/blender/nodes/composite/nodes/node_composite_bokehimage.cc b/source/blender/nodes/composite/nodes/node_composite_bokehimage.cc index ddb1e569c52..13c3b793148 100644 --- a/source/blender/nodes/composite/nodes/node_composite_bokehimage.cc +++ b/source/blender/nodes/composite/nodes/node_composite_bokehimage.cc @@ -91,7 +91,7 @@ class BokehImageOperation : public NodeOperation { return *static_cast<NodeBokehImage *>(bnode().storage); } - /* The exterior angle is the angle between each two consective vertices of the regular polygon + /* The exterior angle is the angle between each two consecutive vertices of the regular polygon * from its center. */ float get_exterior_angle() { |