From e68302d49ea29dff111d83549da633ee3174339d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 9 Aug 2023 11:17:04 +1000 Subject: [PATCH] Cleanup: use block-comments for multi-line comments --- source/blender/blenkernel/intern/anim_sys.cc | 8 ++++---- source/blender/blenkernel/intern/unit.cc | 6 ++---- source/blender/editors/animation/drivers.cc | 13 ++++++------- .../blender/editors/animation/keyframes_keylist.cc | 6 ++++-- source/blender/makesdna/DNA_brush_enums.h | 4 ++-- source/blender/makesrna/intern/rna_ui.cc | 5 +++-- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/source/blender/blenkernel/intern/anim_sys.cc b/source/blender/blenkernel/intern/anim_sys.cc index 16f42b1b628..c5c07322605 100644 --- a/source/blender/blenkernel/intern/anim_sys.cc +++ b/source/blender/blenkernel/intern/anim_sys.cc @@ -730,8 +730,8 @@ static void animsys_blend_in_fcurves(PointerRNA *ptr, case PROP_ENUM: value_to_write = roundf(value_to_write); break; - default: /* All other types are just handled as float, and value_to_write is already - correct. */ + /* All other types are just handled as float, and value_to_write is already correct. */ + default: break; } } @@ -1072,8 +1072,8 @@ NlaEvalStrip *nlastrips_ctime_get_strip(ListBase *list, return nullptr; } break; - case NLASTRIP_TYPE_TRANSITION: /* there must be strips to transition from and to (i.e. prev and - next required) */ + /* There must be strips to transition from and to (i.e. `prev` and `next` required). */ + case NLASTRIP_TYPE_TRANSITION: if (ELEM(nullptr, estrip->prev, estrip->next)) { return nullptr; } diff --git a/source/blender/blenkernel/intern/unit.cc b/source/blender/blenkernel/intern/unit.cc index f59d5b81e21..d9bef027b83 100644 --- a/source/blender/blenkernel/intern/unit.cc +++ b/source/blender/blenkernel/intern/unit.cc @@ -146,7 +146,7 @@ static bUnitDef buMetricLenDef[] = { {"decimeter", "decimeters", "dm", nullptr, "10 Centimeters", "DECIMETERS", UN_SC_DM, 0.0, B_UNIT_DEF_SUPPRESS}, {"centimeter", "centimeters", "cm", nullptr, "Centimeters", "CENTIMETERS", UN_SC_CM, 0.0, B_UNIT_DEF_NONE}, {"millimeter", "millimeters", "mm", nullptr, "Millimeters", "MILLIMETERS", UN_SC_MM, 0.0, B_UNIT_DEF_NONE | B_UNIT_DEF_TENTH}, {"micrometer", "micrometers", "µm", "um", "Micrometers", "MICROMETERS", UN_SC_UM, 0.0, B_UNIT_DEF_NONE}, /* These get displayed because of float precision problems in the transform header, -* could work around, but for now probably people won't use these. */ + * could work around, but for now probably people won't use these. */ #if 0 {"nanometer", "Nanometers", "nm", nullptr, 0.000000001, 0.0, B_UNIT_DEF_NONE}, {"picometer", "Picometers", "pm", nullptr, 0.000000000001, 0.0, B_UNIT_DEF_NONE}, #endif @@ -201,10 +201,8 @@ static bUnitDef buImperialMassDef[] = { {"ounce", "ounces", "oz", nullptr, "Ounces", "OUNCES", UN_SC_OZ, 0.0, B_UNIT_DEF_NONE}, NULL_UNIT, }; static bUnitCollection buImperialMassCollection = {buImperialMassDef, 3, 0, UNIT_COLLECTION_LENGTH(buImperialMassDef)}; - /* Even if user scales the system to a point where km^3 is used, velocity and -* acceleration aren't scaled: that's why we have so few units for them. */ - + * acceleration aren't scaled: that's why we have so few units for them. */ /* Velocity. */ static bUnitDef buMetricVelDef[] = { diff --git a/source/blender/editors/animation/drivers.cc b/source/blender/editors/animation/drivers.cc index be80ac6fbc9..eb9b209eb41 100644 --- a/source/blender/editors/animation/drivers.cc +++ b/source/blender/editors/animation/drivers.cc @@ -324,9 +324,8 @@ int ANIM_add_driver_with_target(ReportList *reports, /* handle curve-property mappings based on mapping_type */ switch (mapping_type) { - case CREATEDRIVER_MAPPING_N_N: /* N-N - Try to match as much as possible, * then use the first - one */ - { + /* N-N - Try to match as much as possible, then use the first one. */ + case CREATEDRIVER_MAPPING_N_N: { /* Use the shorter of the two (to avoid out of bounds access) */ int dst_len = RNA_property_array_check(prop) ? RNA_property_array_length(&ptr, prop) : 1; int src_len = RNA_property_array_check(prop) ? RNA_property_array_length(&ptr2, prop2) : 1; @@ -350,8 +349,8 @@ int ANIM_add_driver_with_target(ReportList *reports, } break; } - - case CREATEDRIVER_MAPPING_1_N: /* 1-N - Specified target index for all */ + /* 1-N - Specified target index for all. */ + case CREATEDRIVER_MAPPING_1_N: default: { int len = RNA_property_array_check(prop) ? RNA_property_array_length(&ptr, prop) : 1; @@ -373,8 +372,8 @@ int ANIM_add_driver_with_target(ReportList *reports, break; } - case CREATEDRIVER_MAPPING_1_1: /* 1-1 - Use the specified index (unless -1) */ - { + /* 1-1 - Use the specified index (unless -1). */ + case CREATEDRIVER_MAPPING_1_1: { done_tot = add_driver_with_target(reports, dst_id, dst_path, diff --git a/source/blender/editors/animation/keyframes_keylist.cc b/source/blender/editors/animation/keyframes_keylist.cc index 25fa6b7488a..c8e2a9f8f33 100644 --- a/source/blender/editors/animation/keyframes_keylist.cc +++ b/source/blender/editors/animation/keyframes_keylist.cc @@ -54,8 +54,10 @@ BLI_INLINE bool is_cfra_lt(const float a, const float b) /* --------------- */ -/* Animation data of Grease Pencil cels, - which are drawings positioned in time. */ +/** + * Animation data of Grease Pencil cels, + * which are drawings positioned in time. + */ struct GreasePencilCel { int frame_number; GreasePencilFrame frame; diff --git a/source/blender/makesdna/DNA_brush_enums.h b/source/blender/makesdna/DNA_brush_enums.h index d352fc8d1e1..c35c3609c7e 100644 --- a/source/blender/makesdna/DNA_brush_enums.h +++ b/source/blender/makesdna/DNA_brush_enums.h @@ -100,8 +100,8 @@ typedef enum eGPDbrush_Flag { GP_BRUSH_FILL_STROKE_COLLIDE = (1 << 18), /* Keep the caps as they are when erasing. Otherwise flatten the caps. */ GP_BRUSH_ERASER_KEEP_CAPS = (1 << 19), - /* Affect only the drawing in the active layer. Otherwise affect all editable drawings in the - object. */ + /* Affect only the drawing in the active layer. + * Otherwise affect all editable drawings in the object. */ GP_BRUSH_ACTIVE_LAYER_ONLY = (1 << 20), } eGPDbrush_Flag; diff --git a/source/blender/makesrna/intern/rna_ui.cc b/source/blender/makesrna/intern/rna_ui.cc index 6c2876b69ef..8e8caa4e030 100644 --- a/source/blender/makesrna/intern/rna_ui.cc +++ b/source/blender/makesrna/intern/rna_ui.cc @@ -1135,8 +1135,9 @@ static void asset_shelf_draw_context_menu(const bContext *C, PointerRNA ptr; RNA_pointer_create(nullptr, shelf_type->rna_ext.srna, nullptr, &ptr); /* dummy */ - FunctionRNA *func = &rna_AssetShelf_draw_context_menu_func; /* RNA_struct_find_function(&ptr, - "draw_context_menu"); */ + + FunctionRNA *func = &rna_AssetShelf_draw_context_menu_func; + // RNA_struct_find_function(&ptr, "draw_context_menu"); ParameterList list; RNA_parameter_list_create(&list, &ptr, func);