From e33f5e36acb9275e105d5b8d5bd812ae223e9fab Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 9 Mar 2024 23:40:57 +1100 Subject: [PATCH] Cleanup: spacing around C-style comment blocks --- intern/cycles/device/cuda/kernel.cpp | 2 +- intern/cycles/device/hip/kernel.cpp | 2 +- intern/cycles/device/metal/kernel.mm | 2 +- intern/cycles/device/metal/util.h | 2 +- .../cycles/kernel/closure/bsdf_principled_hair_huang.h | 8 ++++---- intern/cycles/kernel/osl/closures_setup.h | 2 +- intern/cycles/scene/osl.cpp | 10 +++++----- source/blender/blenkernel/BKE_lib_id.hh | 2 +- source/blender/blenkernel/intern/screen.cc | 4 ++-- source/blender/blenlib/intern/hash_md5.cc | 3 +-- source/blender/blenloader/intern/versioning_400.cc | 2 +- .../blender/blenloader/intern/versioning_defaults.cc | 2 +- .../blender/draw/engines/eevee_next/eevee_gbuffer.hh | 2 +- .../editors/gizmo_library/gizmo_types/dial3d_gizmo.cc | 2 +- source/blender/gpu/metal/mtl_shader_generator.mm | 2 +- source/blender/gpu/vulkan/vk_debug.cc | 4 ++-- source/blender/makesdna/DNA_sequence_types.h | 2 +- 17 files changed, 26 insertions(+), 27 deletions(-) diff --git a/intern/cycles/device/cuda/kernel.cpp b/intern/cycles/device/cuda/kernel.cpp index 3768e3daade..ccf6e0200c3 100644 --- a/intern/cycles/device/cuda/kernel.cpp +++ b/intern/cycles/device/cuda/kernel.cpp @@ -54,4 +54,4 @@ bool CUDADeviceKernels::available(DeviceKernel kernel) const CCL_NAMESPACE_END -#endif /* WITH_CUDA*/ +#endif /* WITH_CUDA */ diff --git a/intern/cycles/device/hip/kernel.cpp b/intern/cycles/device/hip/kernel.cpp index 089e1ac50ff..35f7deb6071 100644 --- a/intern/cycles/device/hip/kernel.cpp +++ b/intern/cycles/device/hip/kernel.cpp @@ -54,4 +54,4 @@ bool HIPDeviceKernels::available(DeviceKernel kernel) const CCL_NAMESPACE_END -#endif /* WITH_HIP*/ +#endif /* WITH_HIP */ diff --git a/intern/cycles/device/metal/kernel.mm b/intern/cycles/device/metal/kernel.mm index 336fe30d9d8..b9da74e2ff3 100644 --- a/intern/cycles/device/metal/kernel.mm +++ b/intern/cycles/device/metal/kernel.mm @@ -903,4 +903,4 @@ bool MetalDeviceKernels::is_benchmark_warmup() CCL_NAMESPACE_END -#endif /* WITH_METAL*/ +#endif /* WITH_METAL */ diff --git a/intern/cycles/device/metal/util.h b/intern/cycles/device/metal/util.h index 96740888b66..902ab074c9f 100644 --- a/intern/cycles/device/metal/util.h +++ b/intern/cycles/device/metal/util.h @@ -32,7 +32,7 @@ enum AppleGPUArchitecture { APPLE_M2_BIG, APPLE_M3, /* Keep APPLE_UNKNOWN at the end of this enum to ensure that unknown future architectures get - the most recent defaults when using comparison operators. */ + * the most recent defaults when using comparison operators. */ APPLE_UNKNOWN, }; diff --git a/intern/cycles/kernel/closure/bsdf_principled_hair_huang.h b/intern/cycles/kernel/closure/bsdf_principled_hair_huang.h index f374c3a2f2c..0d5382cdaf1 100644 --- a/intern/cycles/kernel/closure/bsdf_principled_hair_huang.h +++ b/intern/cycles/kernel/closure/bsdf_principled_hair_huang.h @@ -1,8 +1,8 @@ /* SPDX-FileCopyrightText: 2023 Blender Foundation * - * SPDX-License-Identifier: Apache-2.0 + * SPDX-License-Identifier: Apache-2.0 */ - * This code implements the paper [A Microfacet-based Hair Scattering +/* This code implements the paper [A Microfacet-based Hair Scattering * Model](https://onlinelibrary.wiley.com/doi/full/10.1111/cgf.14588) by Weizhen Huang, Matthias B. * Hullin and Johannes Hanika. */ @@ -205,8 +205,8 @@ ccl_device int bsdf_hair_huang_setup(ccl_private ShaderData *sd, bsdf->tilt = -bsdf->tilt; /* Compute local frame. The Y axis is aligned with the curve tangent; the X axis is perpendicular - to the ray direction for circular cross-sections, or aligned with the major axis for elliptical - cross-sections. */ + * to the ray direction for circular cross-sections, or aligned with the major axis for + * elliptical cross-sections. */ bsdf->extra->Y = safe_normalize(sd->dPdu); const float3 X = safe_normalize(cross(sd->dPdu, sd->wi)); diff --git a/intern/cycles/kernel/osl/closures_setup.h b/intern/cycles/kernel/osl/closures_setup.h index 6e072fcbefb..33a25d63ffc 100644 --- a/intern/cycles/kernel/osl/closures_setup.h +++ b/intern/cycles/kernel/osl/closures_setup.h @@ -58,7 +58,7 @@ ccl_device_forceinline bool osl_closure_skip(KernelGlobals kg, if (reflect_caustics_disabled && has_reflect && !has_transmit) { return true; } - /* Refractive Caustics*/ + /* Refractive Caustics */ if (refract_caustics_disabled && has_transmit && !has_reflect) { return true; } diff --git a/intern/cycles/scene/osl.cpp b/intern/cycles/scene/osl.cpp index fcaaa2a92e8..01aac1508ad 100644 --- a/intern/cycles/scene/osl.cpp +++ b/intern/cycles/scene/osl.cpp @@ -1374,15 +1374,15 @@ void OSLCompiler::parameter_array(const char * /*name*/, const float /*f*/[], in void OSLCompiler::parameter_color_array(const char * /*name*/, const array & /*f*/) {} -void OSLCompiler::parameter_texture(const char * /* name */, - ustring /* filename */, - ustring /* colorspace */) +void OSLCompiler::parameter_texture(const char * /*name*/, + ustring /*filename*/, + ustring /*colorspace*/) { } -void OSLCompiler::parameter_texture(const char * /* name */, const ImageHandle & /*handle*/) {} +void OSLCompiler::parameter_texture(const char * /*name*/, const ImageHandle & /*handle*/) {} -void OSLCompiler::parameter_texture_ies(const char * /* name */, int /* svm_slot */) {} +void OSLCompiler::parameter_texture_ies(const char * /*name*/, int /*svm_slot*/) {} #endif /* WITH_OSL */ diff --git a/source/blender/blenkernel/BKE_lib_id.hh b/source/blender/blenkernel/BKE_lib_id.hh index 6a7b4a58c4b..d8bdedd1570 100644 --- a/source/blender/blenkernel/BKE_lib_id.hh +++ b/source/blender/blenkernel/BKE_lib_id.hh @@ -123,7 +123,7 @@ void BKE_lib_libblock_session_uid_renew(ID *id); * \note: By default, IDs created in a Main database will get the current library of the Main, * i.e. usually (besides in readfile case), they will have a `nullptr` `lib` pointer and be local * data. IDs created outside of a Main database will always get a `nullptr` `lib` pointer. - + * * \param name: can be NULL, in which case we get default name for this ID type. */ void *BKE_id_new(Main *bmain, short type, const char *name); diff --git a/source/blender/blenkernel/intern/screen.cc b/source/blender/blenkernel/intern/screen.cc index f64f8c9e24b..caf4bd18473 100644 --- a/source/blender/blenkernel/intern/screen.cc +++ b/source/blender/blenkernel/intern/screen.cc @@ -159,8 +159,8 @@ static void screen_blend_read_after_liblink(BlendLibReader *reader, ID *id) IDTypeInfo IDType_ID_SCR = { /*id_code*/ ID_SCR, /*id_filter*/ FILTER_ID_SCR, - /* NOTE: Can actually link to any ID type through UI (e.g. Outliner Editor). This is handled - separately though. */ + /* NOTE: Can actually link to any ID type through UI (e.g. Outliner Editor). + * This is handled separately though. */ /*dependencies_id_types*/ FILTER_ID_SCE, /*main_listbase_index*/ INDEX_ID_SCR, /*struct_size*/ sizeof(bScreen), diff --git a/source/blender/blenlib/intern/hash_md5.cc b/source/blender/blenlib/intern/hash_md5.cc index 90489f58452..0a7e09a9b73 100644 --- a/source/blender/blenlib/intern/hash_md5.cc +++ b/source/blender/blenlib/intern/hash_md5.cc @@ -268,8 +268,7 @@ static void *md5_read_ctx(const md5_ctx *ctx, void *resbuf) return resbuf; } -/* -Top level public functions. */ +/* Top level public functions. */ int BLI_hash_md5_stream(FILE *stream, void *resblock) { diff --git a/source/blender/blenloader/intern/versioning_400.cc b/source/blender/blenloader/intern/versioning_400.cc index f37b229ec7d..96b945d840c 100644 --- a/source/blender/blenloader/intern/versioning_400.cc +++ b/source/blender/blenloader/intern/versioning_400.cc @@ -1595,7 +1595,7 @@ static void version_principled_bsdf_specular_tint(bNodeTree *ntree) } } else if (base_color_sock->link) { - /* Metallic Mix is a no-op and equivalent to Base Color*/ + /* Metallic Mix is a no-op and equivalent to Base Color. */ metallic_mix_out = base_color_sock->link->fromsock; metallic_mix_node = base_color_sock->link->fromnode; } diff --git a/source/blender/blenloader/intern/versioning_defaults.cc b/source/blender/blenloader/intern/versioning_defaults.cc index 846b2679a15..bc98b24dc9a 100644 --- a/source/blender/blenloader/intern/versioning_defaults.cc +++ b/source/blender/blenloader/intern/versioning_defaults.cc @@ -329,7 +329,7 @@ static void blo_update_defaults_scene(Main *bmain, Scene *scene) /* Enable Soft Shadows by default. */ scene->eevee.flag |= SCE_EEVEE_SHADOW_SOFT; - /* Default Rotate Increment*/ + /* Default Rotate Increment. */ const float default_snap_angle_increment = DEG2RADF(15.0f); scene->toolsettings->snap_angle_increment_2d = default_snap_angle_increment; scene->toolsettings->snap_angle_increment_3d = default_snap_angle_increment; diff --git a/source/blender/draw/engines/eevee_next/eevee_gbuffer.hh b/source/blender/draw/engines/eevee_next/eevee_gbuffer.hh index 9b9eb36bcc5..cf296929107 100644 --- a/source/blender/draw/engines/eevee_next/eevee_gbuffer.hh +++ b/source/blender/draw/engines/eevee_next/eevee_gbuffer.hh @@ -180,7 +180,7 @@ struct GBuffer { {GPU_LOADACTION_LOAD, GPU_STOREACTION_STORE}, /* Depth */ {GPU_LOADACTION_LOAD, GPU_STOREACTION_STORE}, /* Combined */ {GPU_LOADACTION_CLEAR, GPU_STOREACTION_STORE, {0}}, /* GBuf Header */ - {GPU_LOADACTION_DONT_CARE, GPU_STOREACTION_STORE}, /* GBuf Normal*/ + {GPU_LOADACTION_DONT_CARE, GPU_STOREACTION_STORE}, /* GBuf Normal */ {GPU_LOADACTION_DONT_CARE, GPU_STOREACTION_STORE}, /* GBuf Closure */ {GPU_LOADACTION_DONT_CARE, GPU_STOREACTION_STORE}, /* GBuf Closure 2*/ }); diff --git a/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.cc b/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.cc index 4500f4c1785..94b360e517e 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.cc +++ b/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.cc @@ -236,7 +236,7 @@ static void dial_ghostarc_draw_incremental_angle(const float incremental_angle, /* Chop off excess full circles, draw an arc of ticks centered at current increment; * if there's no even division of circle by increment, - * ends of the arc will move with the rotation */ + * ends of the arc will move with the rotation. */ const float start_offset = fmodf( offset + incremental_angle * (current_increment - total_increment / 2), M_PI * 2.0f); diff --git a/source/blender/gpu/metal/mtl_shader_generator.mm b/source/blender/gpu/metal/mtl_shader_generator.mm index 4b07bf5ccf1..d0077cb5a9b 100644 --- a/source/blender/gpu/metal/mtl_shader_generator.mm +++ b/source/blender/gpu/metal/mtl_shader_generator.mm @@ -303,7 +303,7 @@ static void replace_outvars(std::string &str) /* Generate out-variable pattern for arrays, of form * `OUT(vec2,samples,CRYPTOMATTE_LEVELS_MAX)` * replacing original `out vec2 samples[SAMPLE_LEN]` - * using 'OUT' macro declared in mtl_shader_defines.msl*/ + * using 'OUT' macro declared in `mtl_shader_defines.msl`. */ char *array_end = strchr(word_base2 + len2, ']'); if (array_end != nullptr) { *start = 'O'; diff --git a/source/blender/gpu/vulkan/vk_debug.cc b/source/blender/gpu/vulkan/vk_debug.cc index d9eb97765f0..f27aa5607ef 100644 --- a/source/blender/gpu/vulkan/vk_debug.cc +++ b/source/blender/gpu/vulkan/vk_debug.cc @@ -257,12 +257,12 @@ void VKDebuggingTools::print_labels(const VkDebugUtilsMessengerCallbackDataEXT * VKAPI_ATTR VkBool32 VKAPI_CALL messenger_callback(VkDebugUtilsMessageSeverityFlagBitsEXT message_severity, - VkDebugUtilsMessageTypeFlagsEXT /* message_type*/, + VkDebugUtilsMessageTypeFlagsEXT /*message_type*/, const VkDebugUtilsMessengerCallbackDataEXT *callback_data, void *user_data); VKAPI_ATTR VkBool32 VKAPI_CALL messenger_callback(VkDebugUtilsMessageSeverityFlagBitsEXT message_severity, - VkDebugUtilsMessageTypeFlagsEXT /* message_type*/, + VkDebugUtilsMessageTypeFlagsEXT /*message_type*/, const VkDebugUtilsMessengerCallbackDataEXT *callback_data, void *user_data) { diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index d39671fa981..af015d92f51 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -227,7 +227,7 @@ typedef struct Sequence { /** The linked "bSound" object. */ struct bSound *sound; - /** Handle to #AUD_SequenceEntry*/ + /** Handle to #AUD_SequenceEntry. */ void *scene_sound; float volume;