Cleanup: use block-comments for multi-line comments

This commit is contained in:
Campbell Barton
2023-08-09 11:17:04 +10:00
parent 8198de0b0b
commit e68302d49e
6 changed files with 21 additions and 21 deletions
+4 -4
View File
@@ -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;
}
+2 -4
View File
@@ -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[] = {
+6 -7
View File
@@ -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,
@@ -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;
+2 -2
View File
@@ -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;
+3 -2
View File
@@ -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);