Cleanup: clang-format, trailing space

This commit is contained in:
Campbell Barton 2021-11-30 09:18:41 +11:00
parent e2473d3baf
commit ac447ba1a3
15 changed files with 28 additions and 22 deletions

View File

@ -135,7 +135,7 @@ bool CUDADeviceQueue::enqueue(DeviceKernel kernel,
1,
shared_mem_bytes,
cuda_stream_,
const_cast<void**>(args.values),
const_cast<void **>(args.values),
0),
"enqueue");

View File

@ -134,7 +134,7 @@ bool HIPDeviceQueue::enqueue(DeviceKernel kernel,
1,
shared_mem_bytes,
hip_stream_,
const_cast<void**>(args.values),
const_cast<void **>(args.values),
0),
"enqueue");

View File

@ -26,7 +26,7 @@ class MetalKernelContext {
MetalKernelContext(constant KernelParamsMetal &_launch_params_metal, constant MetalAncillaries * _metal_ancillaries)
: launch_params_metal(_launch_params_metal), metal_ancillaries(_metal_ancillaries)
{}
MetalKernelContext(constant KernelParamsMetal &_launch_params_metal)
: launch_params_metal(_launch_params_metal)
{}

View File

@ -73,4 +73,4 @@ ccl_inline_constant float cie_colour_match[][3] = {
{0.0001f, 0.0000f, 0.0000f}, {0.0001f, 0.0000f, 0.0000f}, {0.0000f, 0.0000f, 0.0000f}
};
/* clang-format on */
/* clang-format on */

View File

@ -25,7 +25,8 @@ TEST(tile_calculate_best_size, Basic)
{
/* Make sure CPU-like case is handled properly. */
EXPECT_EQ(tile_calculate_best_size(false, make_int2(1920, 1080), 1, 1, 1.0f), TileSize(1, 1, 1));
EXPECT_EQ(tile_calculate_best_size(false, make_int2(1920, 1080), 100, 1, 1.0f), TileSize(1, 1, 1));
EXPECT_EQ(tile_calculate_best_size(false, make_int2(1920, 1080), 100, 1, 1.0f),
TileSize(1, 1, 1));
/* Enough path states to fit an entire image with all samples. */
EXPECT_EQ(tile_calculate_best_size(false, make_int2(1920, 1080), 1, 1920 * 1080, 1.0f),

View File

@ -90,10 +90,12 @@ static bool foreach_path_clean_cb(BPathForeachPathData *UNUSED(bpath_data),
/* make sure path names are correct for OS */
static void clean_paths(Main *bmain)
{
BKE_bpath_foreach_path_main(&(BPathForeachPathData){.bmain = bmain,
.callback_function = foreach_path_clean_cb,
.flag = BKE_BPATH_FOREACH_PATH_SKIP_MULTIFILE,
.user_data = NULL});
BKE_bpath_foreach_path_main(&(BPathForeachPathData){
.bmain = bmain,
.callback_function = foreach_path_clean_cb,
.flag = BKE_BPATH_FOREACH_PATH_SKIP_MULTIFILE,
.user_data = NULL,
});
LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
BLI_path_slash_native(scene->r.pic);

View File

@ -549,7 +549,8 @@ static void object_foreach_id(ID *id, LibraryForeachIDData *data)
}
}
static void object_foreach_path_pointcache(ListBase *ptcache_list, BPathForeachPathData *bpath_data)
static void object_foreach_path_pointcache(ListBase *ptcache_list,
BPathForeachPathData *bpath_data)
{
for (PointCache *cache = (PointCache *)ptcache_list->first; cache != nullptr;
cache = cache->next) {

View File

@ -581,7 +581,8 @@ static void volume_foreach_path(ID *id, BPathForeachPathData *bpath_data)
{
Volume *volume = reinterpret_cast<Volume *>(id);
if (volume->packedfile != nullptr && (bpath_data->flag & BKE_BPATH_FOREACH_PATH_SKIP_PACKED) != 0) {
if (volume->packedfile != nullptr &&
(bpath_data->flag & BKE_BPATH_FOREACH_PATH_SKIP_PACKED) != 0) {
return;
}

View File

@ -2,8 +2,8 @@
/**
* Gather pass: Convolve foreground and background parts in separate passes.
*
* Using the min&max CoC tile buffer, we select the best appropriate method to blur the scene color.
* A fast gather path is taken if there is not many CoC variation inside the tile.
* Using the min&max CoC tile buffer, we select the best appropriate method to blur the scene
* color. A fast gather path is taken if there is not many CoC variation inside the tile.
*
* We sample using an octaweb sampling pattern. We randomize the kernel center and each ring
* rotation to ensure maximum coverage.

View File

@ -81,4 +81,4 @@ if(WITH_GTESTS)
)
include(GTestTesting)
blender_add_test_lib(bf_editor_animation_tests "${TEST_SRC}" "${INC};${TEST_INC}" "${INC_SYS}" "${LIB};${TEST_LIB}")
endif()
endif()

View File

@ -351,7 +351,6 @@ typedef struct uiButProgressbar {
float progress;
} uiButProgressbar;
/** Derived struct for #UI_BTYPE_TREEROW. */
typedef struct uiButTreeRow {
uiBut but;

View File

@ -4572,7 +4572,6 @@ static uiWidgetType *widget_type(uiWidgetTypeEnum type)
wt.custom = widget_progressbar;
break;
case UI_WTYPE_TREEROW:
wt.custom = widget_treerow;
break;

View File

@ -34,4 +34,4 @@ void spreadsheet_data_set_region_panels_register(ARegionType &region_type)
BLI_addtail(&region_type.paneltypes, panel_type);
}
} // namespace blender::ed::spreadsheet
} // namespace blender::ed::spreadsheet

View File

@ -2272,7 +2272,8 @@ static void rna_def_filter_video(StructRNA *srna)
prop = RNA_def_property(srna, "use_reverse_frames", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_REVERSE_FRAMES);
RNA_def_property_ui_text(prop, "Reverse Frames", "Reverse frame order");
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
RNA_def_property_update(
prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
prop = RNA_def_property(srna, "color_multiply", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "mul");

View File

@ -151,10 +151,12 @@ static PyObject *bpy_blend_paths(PyObject *UNUSED(self), PyObject *args, PyObjec
list = PyList_New(0);
BKE_bpath_foreach_path_main(&(BPathForeachPathData){.bmain = G_MAIN,
.callback_function = bpy_blend_foreach_path_cb,
.flag = flag,
.user_data = list});
BKE_bpath_foreach_path_main(&(BPathForeachPathData){
.bmain = G_MAIN,
.callback_function = bpy_blend_foreach_path_cb,
.flag = flag,
.user_data = list,
});
return list;
}