[Bf-blender-cvs] [d82372aee3a] master: Cleanup: spelling in comments
Campbell Barton
noreply at git.blender.org
Wed Feb 2 03:56:41 CET 2022
Commit: d82372aee3a473226ea6b565f09cebd54310a4cd
Author: Campbell Barton
Date: Wed Feb 2 13:15:43 2022 +1100
Branches: master
https://developer.blender.org/rBd82372aee3a473226ea6b565f09cebd54310a4cd
Cleanup: spelling in comments
===================================================================
M source/blender/blenkernel/intern/image_partial_update.cc
M source/blender/blenkernel/intern/modifier.c
M source/blender/draw/engines/image/image_drawing_mode.hh
M source/blender/draw/intern/draw_cache_impl_subdivision.cc
M source/blender/editors/gpencil/gpencil_edit.c
M source/blender/gpu/GPU_select.h
M source/blender/gpu/GPU_texture.h
M source/blender/io/wavefront_obj/exporter/obj_export_io.hh
M source/blender/makesrna/intern/rna_asset.c
M source/blender/makesrna/intern/rna_internal.h
M source/blender/render/intern/texture_margin.cc
M source/blender/sequencer/intern/strip_add.c
M tests/python/bl_keymap_validate.py
===================================================================
diff --git a/source/blender/blenkernel/intern/image_partial_update.cc b/source/blender/blenkernel/intern/image_partial_update.cc
index ddf0e18ff9b..876e5276e5a 100644
--- a/source/blender/blenkernel/intern/image_partial_update.cc
+++ b/source/blender/blenkernel/intern/image_partial_update.cc
@@ -273,7 +273,8 @@ struct TileChangeset {
const int previous_chunk_len = chunk_dirty_flags_.size();
chunk_dirty_flags_.resize(chunk_len);
- /* Fast exit. When the changeset was already empty no need to re-init the chunk_validity. */
+ /* Fast exit. When the changeset was already empty no need to
+ * re-initialize the chunk_validity. */
if (!has_dirty_chunks()) {
return;
}
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index e1fd8ff45d1..bdf2568287b 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -1182,8 +1182,8 @@ void BKE_modifier_blend_write(BlendWriter *writer, ListBase *modbase)
#if 0
CollisionModifierData *collmd = (CollisionModifierData *)md;
- // TODO: CollisionModifier should use pointcache
- // + have proper reset events before enabling this
+ /* TODO: CollisionModifier should use pointcache
+ * + have proper reset events before enabling this. */
writestruct(wd, DATA, MVert, collmd->numverts, collmd->x);
writestruct(wd, DATA, MVert, collmd->numverts, collmd->xnew);
writestruct(wd, DATA, MFace, collmd->numfaces, collmd->mfaces);
diff --git a/source/blender/draw/engines/image/image_drawing_mode.hh b/source/blender/draw/engines/image/image_drawing_mode.hh
index dfff93b9429..3be34ef6acb 100644
--- a/source/blender/draw/engines/image/image_drawing_mode.hh
+++ b/source/blender/draw/engines/image/image_drawing_mode.hh
@@ -227,8 +227,7 @@ template<typename TextureMethod> class ScreenSpaceDrawingMode : public AbstractD
GPUTexture *texture = info.texture;
const float texture_width = GPU_texture_width(texture);
const float texture_height = GPU_texture_height(texture);
- // TODO
- // early bound check.
+ /* TODO: early bound check. */
ImageTileWrapper tile_accessor(iterator.tile_data.tile);
float tile_offset_x = static_cast<float>(tile_accessor.get_tile_x_offset());
float tile_offset_y = static_cast<float>(tile_accessor.get_tile_y_offset());
@@ -253,9 +252,9 @@ template<typename TextureMethod> class ScreenSpaceDrawingMode : public AbstractD
if (!region_overlap) {
continue;
}
- // convert the overlapping region to texel space and to ss_pixel space...
- // TODO: first convert to ss_pixel space as integer based. and from there go back to texel
- // space. But perhaps this isn't needed and we could use an extraction offset somehow.
+ /* Convert the overlapping region to texel space and to ss_pixel space...
+ * TODO: first convert to ss_pixel space as integer based. and from there go back to texel
+ * space. But perhaps this isn't needed and we could use an extraction offset somehow. */
rcti gpu_texture_region_to_update;
BLI_rcti_init(&gpu_texture_region_to_update,
floor((changed_overlapping_region_in_uv_space.xmin - info.uv_bounds.xmin) *
@@ -275,8 +274,8 @@ template<typename TextureMethod> class ScreenSpaceDrawingMode : public AbstractD
ceil((changed_overlapping_region_in_uv_space.ymin - tile_offset_y) * tile_height),
ceil((changed_overlapping_region_in_uv_space.ymax - tile_offset_y) * tile_height));
- // Create an image buffer with a size
- // extract and scale into an imbuf
+ /* Create an image buffer with a size.
+ * Extract and scale into an imbuf. */
const int texture_region_width = BLI_rcti_size_x(&gpu_texture_region_to_update);
const int texture_region_height = BLI_rcti_size_y(&gpu_texture_region_to_update);
@@ -437,17 +436,17 @@ template<typename TextureMethod> class ScreenSpaceDrawingMode : public AbstractD
instance_data->partial_update.ensure_image(image);
instance_data->clear_dirty_flag();
- // Step: Find out which screen space textures are needed to draw on the screen. Remove the
- // screen space textures that aren't needed.
+ /* Step: Find out which screen space textures are needed to draw on the screen. Remove the
+ * screen space textures that aren't needed. */
const ARegion *region = draw_ctx->region;
method.update_screen_space_bounds(region);
method.update_uv_bounds(region);
- // Step: Update the GPU textures based on the changes in the image.
+ /* Step: Update the GPU textures based on the changes in the image. */
instance_data->update_gpu_texture_allocations();
update_textures(*instance_data, image, iuser);
- // Step: Add the GPU textures to the shgroup.
+ /* Step: Add the GPU textures to the shgroup. */
instance_data->update_batches();
add_depth_shgroups(*instance_data, image, iuser);
add_shgroups(instance_data);
diff --git a/source/blender/draw/intern/draw_cache_impl_subdivision.cc b/source/blender/draw/intern/draw_cache_impl_subdivision.cc
index a24a3a5a3a7..4a8670a9ee2 100644
--- a/source/blender/draw/intern/draw_cache_impl_subdivision.cc
+++ b/source/blender/draw/intern/draw_cache_impl_subdivision.cc
@@ -999,7 +999,7 @@ static bool draw_subdiv_build_cache(DRWSubdivCache *cache,
cache->face_ptex_offset = BKE_subdiv_face_ptex_offset_get(subdiv);
- // Build patch coordinates for all the face dots
+ /* Build patch coordinates for all the face dots. */
cache->fdots_patch_coords = gpu_vertbuf_create_from_format(get_blender_patch_coords_format(),
mesh_eval->totpoly);
CompressedPatchCoord *blender_fdots_patch_coords = (CompressedPatchCoord *)GPU_vertbuf_get_data(
@@ -1760,7 +1760,7 @@ static void draw_subdiv_cache_ensure_mat_offsets(DRWSubdivCache *cache,
int *mat_start = static_cast<int *>(MEM_callocN(sizeof(int) * mat_len, "subdiv mat_start"));
int *subdiv_polygon_offset = cache->subdiv_polygon_offset;
- // TODO: parallel_reduce?
+ /* TODO: parallel_reduce? */
for (int i = 0; i < mesh_eval->totpoly; i++) {
const MPoly *mpoly = &mesh_eval->mpoly[i];
const int next_offset = (i == mesh_eval->totpoly - 1) ? number_of_quads :
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index afb786da8c6..c910162415d 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -4635,7 +4635,7 @@ static int gpencil_stroke_separate_exec(bContext *C, wmOperator *op)
}
}
- /* Separate the entrie stroke. */
+ /* Separate the entire stroke. */
if (all_points_selected) {
/* deselect old stroke */
gps->flag &= ~GP_STROKE_SELECT;
diff --git a/source/blender/gpu/GPU_select.h b/source/blender/gpu/GPU_select.h
index 90bbde4976c..3076058c075 100644
--- a/source/blender/gpu/GPU_select.h
+++ b/source/blender/gpu/GPU_select.h
@@ -51,7 +51,7 @@ typedef struct GPUSelectResult {
/**
* The nearest depth.
* - Only supported by picking modes (#GPU_SELECT_PICK_ALL and #GPU_SELECT_PICK_NEAREST)
- * since occlusion quiries don't provide a convenient way of accessing the depth-buffer.
+ * since occlusion quires don't provide a convenient way of accessing the depth-buffer.
* - OpenGL's `GL_SELECT` supported both near and far depths,
* this has not been included as Blender doesn't need this however support could be added.
*/
diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h
index 6fae4a13918..7812c7a7257 100644
--- a/source/blender/gpu/GPU_texture.h
+++ b/source/blender/gpu/GPU_texture.h
@@ -272,7 +272,8 @@ void *GPU_texture_read(GPUTexture *tex, eGPUDataFormat data_format, int miplvl);
* Fills the whole texture with the same data for all pixels.
* \warning Only work for 2D texture for now.
* \warning Only clears the mip 0 of the texture.
- * \param data_format: data format of the pixel data. \note The format is float for unorm textures.
+ * \param data_format: data format of the pixel data.
+ * \note The format is float for unorm textures.
* \param data: 1 pixel worth of data to fill the texture with.
*/
void GPU_texture_clear(GPUTexture *tex, eGPUDataFormat data_format, const void *data);
diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_io.hh b/source/blender/io/wavefront_obj/exporter/obj_export_io.hh
index f1a8178bf0a..692eb7f5db5 100644
--- a/source/blender/io/wavefront_obj/exporter/obj_export_io.hh
+++ b/source/blender/io/wavefront_obj/exporter/obj_export_io.hh
@@ -125,10 +125,10 @@ constexpr bool is_type_integral = (... && std::is_integral_v<std::decay_t<T>>);
template<typename... T>
constexpr bool is_type_string_related = (... && std::is_constructible_v<std::string, T>);
-// gcc (at least 9.3) while compiling the obj_exporter_tests.cc with optimizations on,
-// results in "obj_export_io.hh:205:18: warning: ā%sā directive output truncated writing 34 bytes
-// into a region of size 6" and similar warnings. Yes the output is truncated, and that is covered
-// as an edge case by tests on purpose.
+/* GCC (at least 9.3) while compiling the obj_exporter_tests.cc with optimizations on,
+ * results in "obj_export_io.hh:205:18: warning: ā%sā directive output truncated writing 34 bytes
+ * into a region of size 6" and similar warnings. Yes the output is truncated, and that is covered
+ * as an edge case by tests on purpose. */
#if defined __GNUC__
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wformat-truncation"
diff --git a/source/blender/makesrna/intern/rna_asset.c b/source/blender/makesrna/intern/rna_asset.c
index e79cbc838d4..e80c8559020 100644
--- a/source/blender/makesrna/intern/rna_asset.c
+++ b/source/blender/makesrna/intern/rna_asset.c
@@ -237,7 +237,7 @@ static void rna_As
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list