Cleanup: clang-format

Add ccl_gpu_kernel_postfix as a statement macro to prevent the following
declarations from being indented.
This commit is contained in:
Campbell Barton 2022-04-04 12:25:03 +10:00
parent f6a20fca5e
commit 27fea7a3a5
7 changed files with 11 additions and 9 deletions

View File

@ -269,6 +269,7 @@ ForEachMacros:
StatementMacros:
- PyObject_HEAD
- PyObject_VAR_HEAD
- ccl_gpu_kernel_postfix
MacroBlockBegin: "^BSDF_CLOSURE_CLASS_BEGIN$"
MacroBlockEnd: "^BSDF_CLOSURE_CLASS_END$"

View File

@ -97,7 +97,7 @@ ccl_device_inline float mat22_determinant(const float4 m)
}
/* Inverse of a 2x2 matrix encoded in a row-major order float4 */
ccl_device_inline float mat22_inverse(const float4 m, ccl_private float4& m_inverse)
ccl_device_inline float mat22_inverse(const float4 m, ccl_private float4 &m_inverse)
{
float det = mat22_determinant(m);
if (fabsf(det) < MNEE_MIN_DETERMINANT)

View File

@ -167,8 +167,8 @@ void workbench_shadow_cache_init(WORKBENCH_Data *data)
}
static const BoundBox *workbench_shadow_object_shadow_bbox_get(WORKBENCH_PrivateData *wpd,
Object *ob,
WORKBENCH_ObjectData *oed)
Object *ob,
WORKBENCH_ObjectData *oed)
{
if (oed->shadow_bbox_dirty || wpd->shadow_changed) {
float tmp_mat[4][4];

View File

@ -614,7 +614,7 @@ static void drw_call_obinfos_init(DRWObjectInfos *ob_infos, Object *ob)
drw_call_calc_orco(ob, ob_infos->orcotexfac);
/* Random float value. */
uint random = (DST.dupli_source) ?
DST.dupli_source->random_id :
DST.dupli_source->random_id :
/* TODO(fclem): this is rather costly to do at runtime. Maybe we can
* put it in ob->runtime and make depsgraph ensure it is up to date. */
BLI_hash_int_2d(BLI_hash_string(ob->id.name + 2), 0);

View File

@ -303,7 +303,7 @@ int UI_pie_menu_invoke_from_rna_enum(struct bContext *C,
* - Julian (Feb 2016)
* \{ */
struct PieMenuLevelData {
struct PieMenuLevelData {
char title[UI_MAX_NAME_STR]; /* parent pie title, copied for level */
int icon; /* parent pie icon, copied for level */
int totitem; /* total count of *remaining* items */
@ -313,7 +313,7 @@ int UI_pie_menu_invoke_from_rna_enum(struct bContext *C,
const char *propname;
IDProperty *properties;
wmOperatorCallContext context, flag;
} ;
};
/**
* Invokes a new pie menu for a new level.

View File

@ -211,8 +211,8 @@ static int build_hierarchy_foreach_ID_cb(LibraryIDLinkCallbackData *cb_data)
}
void TreeDisplayOverrideLibraryHierarchies::build_hierarchy_for_ID(Main *bmain,
ID &override_root_id,
TreeElementID &te_id) const
ID &override_root_id,
TreeElementID &te_id) const
{
BuildHierarchyForeachIDCbData build_data{*bmain, space_outliner_, override_root_id, &te_id};
build_data.parent_ids.add(&override_root_id);

View File

@ -25,7 +25,8 @@ namespace blender::ed::outliner {
/* Convenience/readability. */
template<typename T> using List = ListBaseWrapper<T>;
TreeDisplayOverrideLibraryProperties::TreeDisplayOverrideLibraryProperties(SpaceOutliner &space_outliner)
TreeDisplayOverrideLibraryProperties::TreeDisplayOverrideLibraryProperties(
SpaceOutliner &space_outliner)
: AbstractTreeDisplay(space_outliner)
{
}