diff --git a/intern/cycles/device/metal/device_impl.h b/intern/cycles/device/metal/device_impl.h index 633618d0169..4bbe576af2e 100644 --- a/intern/cycles/device/metal/device_impl.h +++ b/intern/cycles/device/metal/device_impl.h @@ -116,7 +116,9 @@ class MetalDevice : public Device { bool use_local_atomic_sort() const; - string preprocess_source(MetalPipelineType pso_type, const uint kernel_features, string* source = nullptr); + string preprocess_source(MetalPipelineType pso_type, + const uint kernel_features, + string *source = nullptr); bool make_source_and_check_if_compile_needed(MetalPipelineType pso_type); diff --git a/intern/cycles/device/metal/device_impl.mm b/intern/cycles/device/metal/device_impl.mm index 36d7fcf316d..d196a880b66 100644 --- a/intern/cycles/device/metal/device_impl.mm +++ b/intern/cycles/device/metal/device_impl.mm @@ -310,7 +310,9 @@ bool MetalDevice::use_local_atomic_sort() const return DebugFlags().metal.use_local_atomic_sort; } -string MetalDevice::preprocess_source(MetalPipelineType pso_type, const uint kernel_features, string* source) +string MetalDevice::preprocess_source(MetalPipelineType pso_type, + const uint kernel_features, + string *source) { string global_defines; if (use_adaptive_compilation()) { @@ -362,18 +364,18 @@ string MetalDevice::preprocess_source(MetalPipelineType pso_type, const uint ker const double starttime = time_dt(); # define KERNEL_STRUCT_BEGIN(name, parent) \ - string_replace_same_length(*source, "kernel_data." #parent ".", "kernel_data_" #parent "_"); + string_replace_same_length(*source, "kernel_data." #parent ".", "kernel_data_" #parent "_"); bool next_member_is_specialized = true; # define KERNEL_STRUCT_MEMBER_DONT_SPECIALIZE next_member_is_specialized = false; # define KERNEL_STRUCT_MEMBER(parent, _type, name) \ - if (!next_member_is_specialized) { \ - string_replace( \ - *source, "kernel_data_" #parent "_" #name, "kernel_data." #parent ".__unused_" #name); \ - next_member_is_specialized = true; \ - } + if (!next_member_is_specialized) { \ + string_replace( \ + *source, "kernel_data_" #parent "_" #name, "kernel_data." #parent ".__unused_" #name); \ + next_member_is_specialized = true; \ + } # include "kernel/data_template.h" @@ -411,7 +413,7 @@ void MetalDevice::make_source(MetalPipelineType pso_type, const uint kernel_feat string &source = this->source[pso_type]; source = "\n#include \"kernel/device/metal/kernel.metal\"\n"; source = path_source_replace_includes(source, path_get("source")); - + /* Perform any required specialization on the source. * With Metal function constants we can generate a single variant of the kernel source which can * be repeatedly respecialized. @@ -463,7 +465,8 @@ bool MetalDevice::make_source_and_check_if_compile_needed(MetalPipelineType pso_ # define KERNEL_STRUCT_MEMBER_DONT_SPECIALIZE next_member_is_specialized = false; - /* Add specialization constants to md5 so that 'get_best_pipeline' is able to return a suitable match. */ + /* Add specialization constants to md5 so that 'get_best_pipeline' is able to return a suitable + * match. */ # define KERNEL_STRUCT_MEMBER(parent, _type, name) \ if (next_member_is_specialized) { \ constant_values += string(#parent "." #name "=") + \ diff --git a/intern/cycles/device/metal/kernel.mm b/intern/cycles/device/metal/kernel.mm index 11c88474bb8..327e47befab 100644 --- a/intern/cycles/device/metal/kernel.mm +++ b/intern/cycles/device/metal/kernel.mm @@ -443,7 +443,7 @@ bool MetalKernelPipeline::should_use_binary_archive() const if ((device_kernel >= DEVICE_KERNEL_INTEGRATOR_SHADE_BACKGROUND && device_kernel <= DEVICE_KERNEL_INTEGRATOR_SHADE_SHADOW) || - (device_kernel >= DEVICE_KERNEL_SHADER_EVAL_DISPLACE && + (device_kernel >= DEVICE_KERNEL_SHADER_EVAL_DISPLACE && device_kernel <= DEVICE_KERNEL_SHADER_EVAL_CURVE_SHADOW_TRANSPARENCY)) { /* Archive all shade kernels - they take a long time to compile. */ return true; diff --git a/intern/ghost/GHOST_IWindow.h b/intern/ghost/GHOST_IWindow.h index 4fc24b6ca86..f92f4241a40 100644 --- a/intern/ghost/GHOST_IWindow.h +++ b/intern/ghost/GHOST_IWindow.h @@ -215,11 +215,8 @@ class GHOST_IWindow { * Needs to be called after each swap events as the framebuffer will change. * \return A boolean success indicator. */ - virtual GHOST_TSuccess getVulkanBackbuffer(void *image, - void *framebuffer, - void *render_pass, - void *extent, - uint32_t *fb_id) = 0; + virtual GHOST_TSuccess getVulkanBackbuffer( + void *image, void *framebuffer, void *render_pass, void *extent, uint32_t *fb_id) = 0; /** * Invalidates the contents of this window. diff --git a/intern/ghost/intern/GHOST_Window.cpp b/intern/ghost/intern/GHOST_Window.cpp index a1444bd5c8a..aeff3e8df0a 100644 --- a/intern/ghost/intern/GHOST_Window.cpp +++ b/intern/ghost/intern/GHOST_Window.cpp @@ -107,14 +107,10 @@ uint GHOST_Window::getDefaultFramebuffer() return (m_context) ? m_context->getDefaultFramebuffer() : 0; } -GHOST_TSuccess GHOST_Window::getVulkanBackbuffer(void *image, - void *framebuffer, - void *render_pass, - void *extent, - uint32_t *fb_id) +GHOST_TSuccess GHOST_Window::getVulkanBackbuffer( + void *image, void *framebuffer, void *render_pass, void *extent, uint32_t *fb_id) { - return m_context->getVulkanBackbuffer( - image, framebuffer, render_pass, extent, fb_id); + return m_context->getVulkanBackbuffer(image, framebuffer, render_pass, extent, fb_id); } GHOST_TSuccess GHOST_Window::activateDrawingContext() diff --git a/source/blender/blenlib/intern/storage_apple.mm b/source/blender/blenlib/intern/storage_apple.mm index e457c17adfd..bd1b526fb9e 100644 --- a/source/blender/blenlib/intern/storage_apple.mm +++ b/source/blender/blenlib/intern/storage_apple.mm @@ -15,7 +15,6 @@ #include "BLI_path_util.h" #include "BLI_string.h" - /* Extended file attribute used by OneDrive to mark placeholder files. */ static const char *ONEDRIVE_RECALLONOPEN_ATTRIBUTE = "com.microsoft.OneDrive.RecallOnOpen"; @@ -188,7 +187,8 @@ const char *BLI_expand_tilde(const char *path_with_tilde) return path_expanded; } -char *BLI_current_working_dir(char *dir, const size_t maxncpy) { +char *BLI_current_working_dir(char *dir, const size_t maxncpy) +{ /* Can't just copy to the *dir pointer, as [path getCString gets grumpy.*/ static char path_expanded[PATH_MAX]; @autoreleasepool { @@ -200,10 +200,11 @@ char *BLI_current_working_dir(char *dir, const size_t maxncpy) { } } -bool BLI_change_working_dir(const char* dir) { +bool BLI_change_working_dir(const char *dir) +{ @autoreleasepool { - NSString* path = [[NSString alloc] initWithUTF8String: dir]; - if ([[NSFileManager defaultManager] changeCurrentDirectoryPath: path] == YES) { + NSString *path = [[NSString alloc] initWithUTF8String:dir]; + if ([[NSFileManager defaultManager] changeCurrentDirectoryPath:path] == YES) { return true; } else { diff --git a/source/blender/blenlib/tests/BLI_fileops_test.cc b/source/blender/blenlib/tests/BLI_fileops_test.cc index bed75e332f7..5a6d0381c93 100644 --- a/source/blender/blenlib/tests/BLI_fileops_test.cc +++ b/source/blender/blenlib/tests/BLI_fileops_test.cc @@ -89,7 +89,7 @@ TEST_F(ChangeWorkingDirectoryTest, change_working_directory) * picks the true var folder, not the alias, meaning the below * comparison always fails unless we prepend with the correct value. */ test_temp_dir = "/private" + test_temp_dir; -#endif // #ifdef __APPLE__ +#endif // #ifdef __APPLE__ ASSERT_EQ(BLI_path_cmp_normalized(cwd, test_temp_dir.c_str()), 0) << "the path of the current working directory should equal the path of the temporary " diff --git a/source/blender/draw/engines/overlay/overlay_edit_uv.cc b/source/blender/draw/engines/overlay/overlay_edit_uv.cc index e92b19ad7ed..76fbbac774b 100644 --- a/source/blender/draw/engines/overlay/overlay_edit_uv.cc +++ b/source/blender/draw/engines/overlay/overlay_edit_uv.cc @@ -117,10 +117,10 @@ void OVERLAY_edit_uv_init(OVERLAY_Data *vedata) const bool show_modified_uvs = sima->flag & SI_DRAWSHADOW; const bool is_tiled_image = image && (image->source == IMA_SRC_TILED); const bool do_edges_only = (ts->uv_flag & UV_SYNC_SELECTION) ? - /* NOTE: Ignore #SCE_SELECT_EDGE because a single selected edge - * on the mesh may cause single UV vertices to be selected. */ - false : - (ts->uv_selectmode == UV_SELECT_EDGE); + /* NOTE: Ignore #SCE_SELECT_EDGE because a single selected edge + * on the mesh may cause single UV vertices to be selected. */ + false : + (ts->uv_selectmode == UV_SELECT_EDGE); const bool do_faces = ((sima->flag & SI_NO_DRAWFACES) == 0); const bool do_face_dots = (ts->uv_flag & UV_SYNC_SELECTION) ? (ts->selectmode & SCE_SELECT_FACE) != 0 : diff --git a/source/blender/editors/interface/interface_handlers.cc b/source/blender/editors/interface/interface_handlers.cc index 4b6f0f0f2e0..48b764f19de 100644 --- a/source/blender/editors/interface/interface_handlers.cc +++ b/source/blender/editors/interface/interface_handlers.cc @@ -9657,7 +9657,7 @@ static int ui_handle_viewlist_items_hover(const wmEvent *event, const ARegion *r bool has_item = false; LISTBASE_FOREACH (uiBlock *, block, ®ion->uiblocks) { LISTBASE_FOREACH (uiBut *, but, &block->buttons) { - if (ELEM(but->type, UI_BTYPE_VIEW_ITEM,UI_BTYPE_LISTROW)) { + if (ELEM(but->type, UI_BTYPE_VIEW_ITEM, UI_BTYPE_LISTROW)) { but->flag &= ~UI_ACTIVE; has_item = true; } diff --git a/source/blender/editors/interface/interface_widgets.cc b/source/blender/editors/interface/interface_widgets.cc index b6b512be703..55ede2eda80 100644 --- a/source/blender/editors/interface/interface_widgets.cc +++ b/source/blender/editors/interface/interface_widgets.cc @@ -4092,7 +4092,7 @@ static void widget_list_itembut(uiWidgetColors *wcol, const float rad = widget_radius_from_zoom(zoom, wcol); round_box_edges(&wtb, UI_CNR_ALL, rect, rad); - if (state->but_flag & UI_ACTIVE && !(state->but_flag & UI_SELECT)) { + if (state->but_flag & UI_ACTIVE && !(state->but_flag & UI_SELECT)) { copy_v3_v3_uchar(wcol->inner, wcol->text); wcol->inner[3] = 20; } diff --git a/source/blender/editors/mesh/editface.cc b/source/blender/editors/mesh/editface.cc index 6729a1ad035..d1018f9a461 100644 --- a/source/blender/editors/mesh/editface.cc +++ b/source/blender/editors/mesh/editface.cc @@ -234,7 +234,6 @@ static void build_poly_connections(blender::AtomicDisjointSet &islands, /* Polys are connected if they share edges. By connecting all edges of a loop (as long as they * are not a seam) we can find connected faces. */ threading::parallel_for(polys.index_range(), 1024, [&](const IndexRange range) { - for (const int poly_index : range) { if (hide_poly[poly_index]) { continue; @@ -259,9 +258,7 @@ static void build_poly_connections(blender::AtomicDisjointSet &islands, islands.join(inner_mloop.e, outer_mloop.e); } } - } - }); } diff --git a/source/blender/io/usd/intern/usd_reader_mesh.cc b/source/blender/io/usd/intern/usd_reader_mesh.cc index 6e6008b5cb6..087f03ecd65 100644 --- a/source/blender/io/usd/intern/usd_reader_mesh.cc +++ b/source/blender/io/usd/intern/usd_reader_mesh.cc @@ -194,7 +194,8 @@ void USDMeshReader::read_object_data(Main *bmain, const double motionSampleTime) Mesh *mesh = (Mesh *)object_->data; is_initial_load_ = true; - const USDMeshReadParams params = create_mesh_read_params(motionSampleTime, import_params_.mesh_read_flag); + const USDMeshReadParams params = create_mesh_read_params(motionSampleTime, + import_params_.mesh_read_flag); Mesh *read_mesh = this->read_mesh(mesh, params, nullptr); @@ -850,7 +851,8 @@ Mesh *USDMeshReader::read_mesh(Mesh *existing_mesh, } } - read_mesh_sample(&settings, active_mesh, params.motion_sample_time, new_mesh || is_initial_load_); + read_mesh_sample( + &settings, active_mesh, params.motion_sample_time, new_mesh || is_initial_load_); if (new_mesh) { /* Here we assume that the number of materials doesn't change, i.e. that @@ -862,7 +864,8 @@ Mesh *USDMeshReader::read_mesh(Mesh *existing_mesh, bke::MutableAttributeAccessor attributes = active_mesh->attributes_for_write(); bke::SpanAttributeWriter material_indices = attributes.lookup_or_add_for_write_span("material_index", ATTR_DOMAIN_FACE); - assign_facesets_to_material_indices(params.motion_sample_time, material_indices.span, &mat_map); + assign_facesets_to_material_indices( + params.motion_sample_time, material_indices.span, &mat_map); material_indices.finish(); } }