From e7f88c1050db5a4c783b02876876dfed7bc20b8b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 26 May 2023 13:30:14 +1000 Subject: [PATCH] Cleanup: format --- intern/cycles/kernel/light/background.h | 3 +-- source/blender/blenlib/intern/offset_indices.cc | 3 ++- source/blender/blenlib/intern/winstuff.c | 3 ++- source/blender/editors/space_userpref/userpref_ops.c | 6 +++--- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/intern/cycles/kernel/light/background.h b/intern/cycles/kernel/light/background.h index 0909eee9c5b..e146f5cd014 100644 --- a/intern/cycles/kernel/light/background.h +++ b/intern/cycles/kernel/light/background.h @@ -54,8 +54,7 @@ ccl_device float3 background_map_sample(KernelGlobals kg, float2 rand, ccl_priva int middle = first + step; if (kernel_data_fetch(light_background_conditional_cdf, index_v * cdf_width + middle).y < - rand.x) - { + rand.x) { first = middle + 1; count -= step + 1; } diff --git a/source/blender/blenlib/intern/offset_indices.cc b/source/blender/blenlib/intern/offset_indices.cc index 904e71c0a43..acdd12c13ce 100644 --- a/source/blender/blenlib/intern/offset_indices.cc +++ b/source/blender/blenlib/intern/offset_indices.cc @@ -5,7 +5,8 @@ namespace blender::offset_indices { -OffsetIndices accumulate_counts_to_offsets(MutableSpan counts_to_offsets, const int start_offset) +OffsetIndices accumulate_counts_to_offsets(MutableSpan counts_to_offsets, + const int start_offset) { int offset = start_offset; for (const int i : counts_to_offsets.index_range().drop_back(1)) { diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c index 78fcee4c3da..addacd354a5 100644 --- a/source/blender/blenlib/intern/winstuff.c +++ b/source/blender/blenlib/intern/winstuff.c @@ -44,7 +44,8 @@ int BLI_windows_get_executable_dir(char *str) return 1; } -bool BLI_windows_is_store_install(void) { +bool BLI_windows_is_store_install(void) +{ char install_dir[FILE_MAXDIR]; BLI_windows_get_executable_dir(install_dir); return (BLI_strcasestr(install_dir, "\\WindowsApps\\") != NULL); diff --git a/source/blender/editors/space_userpref/userpref_ops.c b/source/blender/editors/space_userpref/userpref_ops.c index 81bd09866ac..17f708a0292 100644 --- a/source/blender/editors/space_userpref/userpref_ops.c +++ b/source/blender/editors/space_userpref/userpref_ops.c @@ -237,8 +237,7 @@ static void PREFERENCES_OT_asset_library_remove(wmOperatorType *ot) static bool associate_blend_poll(bContext *C) { #ifdef WIN32 - if (BLI_windows_is_store_install()) - { + if (BLI_windows_is_store_install()) { CTX_wm_operator_poll_msg_set(C, "Not available for Microsoft Store installations"); return false; } @@ -253,7 +252,8 @@ static int associate_blend_exec(bContext *UNUSED(C), wmOperator *op) { #ifdef WIN32 if (BLI_windows_is_store_install()) { - BKE_report(op->reports, RPT_ERROR, "Registration not possible from Microsoft Store installations"); + BKE_report( + op->reports, RPT_ERROR, "Registration not possible from Microsoft Store installations"); return OPERATOR_CANCELLED; }