From 93eb460dd0aca4de33bf780de76eee319c224bae Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 30 Jul 2021 16:19:19 +1000 Subject: Cleanup: clang-format (re-run after v12 version bump) --- intern/cycles/device/device_cpu.cpp | 2 +- intern/cycles/kernel/closure/bssrdf.h | 6 +++--- intern/cycles/kernel/filter/filter_defines.h | 17 ++++++++--------- intern/cycles/render/graph.h | 2 +- intern/cycles/render/scene.h | 2 +- intern/cycles/util/util_avxb.h | 2 +- intern/cycles/util/util_avxi.h | 2 +- intern/cycles/util/util_sseb.h | 2 +- intern/cycles/util/util_ssei.h | 2 +- intern/ghost/intern/GHOST_ContextWGL.cpp | 15 +++++++-------- intern/ghost/intern/GHOST_SystemWin32.cpp | 7 +++---- intern/ghost/intern/GHOST_SystemX11.cpp | 6 +++--- 12 files changed, 31 insertions(+), 34 deletions(-) (limited to 'intern') diff --git a/intern/cycles/device/device_cpu.cpp b/intern/cycles/device/device_cpu.cpp index 0e3c771dbc3..4a6e77d6eaa 100644 --- a/intern/cycles/device/device_cpu.cpp +++ b/intern/cycles/device/device_cpu.cpp @@ -57,8 +57,8 @@ #include "util/util_function.h" #include "util/util_logging.h" #include "util/util_map.h" -#include "util/util_openimagedenoise.h" #include "util/util_opengl.h" +#include "util/util_openimagedenoise.h" #include "util/util_optimization.h" #include "util/util_progress.h" #include "util/util_system.h" diff --git a/intern/cycles/kernel/closure/bssrdf.h b/intern/cycles/kernel/closure/bssrdf.h index de65451d82c..562daf1286d 100644 --- a/intern/cycles/kernel/closure/bssrdf.h +++ b/intern/cycles/kernel/closure/bssrdf.h @@ -432,9 +432,9 @@ ccl_device void bssrdf_sample(const ShaderClosure *sc, float xi, float *r, float xi *= bssrdf->channels; if (xi < 1.0f) { - radius = (bssrdf->radius.x > 0.0f) ? - bssrdf->radius.x : - (bssrdf->radius.y > 0.0f) ? bssrdf->radius.y : bssrdf->radius.z; + radius = (bssrdf->radius.x > 0.0f) ? bssrdf->radius.x : + (bssrdf->radius.y > 0.0f) ? bssrdf->radius.y : + bssrdf->radius.z; } else if (xi < 2.0f) { xi -= 1.0f; diff --git a/intern/cycles/kernel/filter/filter_defines.h b/intern/cycles/kernel/filter/filter_defines.h index 0e51eeef92f..1c0ac5e2cb7 100644 --- a/intern/cycles/kernel/filter/filter_defines.h +++ b/intern/cycles/kernel/filter/filter_defines.h @@ -52,15 +52,14 @@ typedef struct TileInfo { tile_buffer_6, tile_buffer_7, tile_buffer_8, tile_buffer_9 # define ccl_get_tile_buffer(id) \ (id == 0 ? tile_buffer_1 : \ - id == 1 ? \ - tile_buffer_2 : \ - id == 2 ? \ - tile_buffer_3 : \ - id == 3 ? tile_buffer_4 : \ - id == 4 ? tile_buffer_5 : \ - id == 5 ? tile_buffer_6 : \ - id == 6 ? tile_buffer_7 : \ - id == 7 ? tile_buffer_8 : tile_buffer_9) + id == 1 ? tile_buffer_2 : \ + id == 2 ? tile_buffer_3 : \ + id == 3 ? tile_buffer_4 : \ + id == 4 ? tile_buffer_5 : \ + id == 5 ? tile_buffer_6 : \ + id == 6 ? tile_buffer_7 : \ + id == 7 ? tile_buffer_8 : \ + tile_buffer_9) #else # ifdef __KERNEL_CUDA__ # define CCL_FILTER_TILE_INFO ccl_global TileInfo *tile_info diff --git a/intern/cycles/render/graph.h b/intern/cycles/render/graph.h index 24de06123ca..5102b182593 100644 --- a/intern/cycles/render/graph.h +++ b/intern/cycles/render/graph.h @@ -356,7 +356,7 @@ class ShaderGraph : public NodeOwner { /* This function is used to create a node of a specified type instead of * calling 'new', and sets the graph as the owner of the node. */ - template T *create_node(Args &&... args) + template T *create_node(Args &&...args) { T *node = new T(args...); node->set_owner(this); diff --git a/intern/cycles/render/scene.h b/intern/cycles/render/scene.h index 2e7fe50d5cf..7d8a6774381 100644 --- a/intern/cycles/render/scene.h +++ b/intern/cycles/render/scene.h @@ -299,7 +299,7 @@ class Scene : public NodeOwner { * node array (e.g. Scene::geometry for Geometry nodes) and tag the appropriate * manager for an update. */ - template T *create_node(Args &&... args) + template T *create_node(Args &&...args) { T *node = new T(args...); node->set_owner(this); diff --git a/intern/cycles/util/util_avxb.h b/intern/cycles/util/util_avxb.h index 17d505c077a..15215d04ca3 100644 --- a/intern/cycles/util/util_avxb.h +++ b/intern/cycles/util/util_avxb.h @@ -57,7 +57,7 @@ struct avxb { : m256(_mm256_insertf128_ps(_mm256_castps128_ps256(a), b, 1)) { } - __forceinline operator const __m256 &(void)const + __forceinline operator const __m256 &(void) const { return m256; } diff --git a/intern/cycles/util/util_avxi.h b/intern/cycles/util/util_avxi.h index 3db646e61f4..0ae4bf271c8 100644 --- a/intern/cycles/util/util_avxi.h +++ b/intern/cycles/util/util_avxi.h @@ -54,7 +54,7 @@ struct avxi { __forceinline avxi(const __m256i a) : m256(a) { } - __forceinline operator const __m256i &(void)const + __forceinline operator const __m256i &(void) const { return m256; } diff --git a/intern/cycles/util/util_sseb.h b/intern/cycles/util/util_sseb.h index 4dbd5b8046e..6afce4f8909 100644 --- a/intern/cycles/util/util_sseb.h +++ b/intern/cycles/util/util_sseb.h @@ -57,7 +57,7 @@ struct sseb { __forceinline sseb(const __m128 input) : m128(input) { } - __forceinline operator const __m128 &(void)const + __forceinline operator const __m128 &(void) const { return m128; } diff --git a/intern/cycles/util/util_ssei.h b/intern/cycles/util/util_ssei.h index cd51dbff2f1..94412fb77e7 100644 --- a/intern/cycles/util/util_ssei.h +++ b/intern/cycles/util/util_ssei.h @@ -57,7 +57,7 @@ struct ssei { __forceinline ssei(const __m128i a) : m128(a) { } - __forceinline operator const __m128i &(void)const + __forceinline operator const __m128i &(void) const { return m128; } diff --git a/intern/ghost/intern/GHOST_ContextWGL.cpp b/intern/ghost/intern/GHOST_ContextWGL.cpp index b5b3fab838d..3d1b78f864f 100644 --- a/intern/ghost/intern/GHOST_ContextWGL.cpp +++ b/intern/ghost/intern/GHOST_ContextWGL.cpp @@ -475,16 +475,15 @@ int GHOST_ContextWGL::choose_pixel_format(bool stereoVisual, bool needAlpha) PIXELFORMATDESCRIPTOR preferredPFD = { sizeof(PIXELFORMATDESCRIPTOR), /* size */ 1, /* version */ - (DWORD)( - PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW | - PFD_DOUBLEBUFFER | /* support double-buffering */ - (stereoVisual ? PFD_STEREO : 0) | /* support stereo */ - ( + (DWORD)(PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW | + PFD_DOUBLEBUFFER | /* support double-buffering */ + (stereoVisual ? PFD_STEREO : 0) | /* support stereo */ + ( #ifdef WIN32_COMPOSITING - needAlpha ? - PFD_SUPPORT_COMPOSITION : /* support composition for transparent background */ + needAlpha ? PFD_SUPPORT_COMPOSITION : /* support composition for transparent + background */ #endif - 0)), + 0)), PFD_TYPE_RGBA, /* color type */ (BYTE)(needAlpha ? 32 : 24), /* preferred color depth */ 0, diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index f2ed981751c..694efaaaf03 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -2111,10 +2111,9 @@ GHOST_TSuccess GHOST_SystemWin32::showMessageBox(const char *title, config.cbSize = sizeof(config); config.hInstance = 0; config.dwCommonButtons = 0; - config.pszMainIcon = (dialog_options & GHOST_DialogError ? - TD_ERROR_ICON : - dialog_options & GHOST_DialogWarning ? TD_WARNING_ICON : - TD_INFORMATION_ICON); + config.pszMainIcon = (dialog_options & GHOST_DialogError ? TD_ERROR_ICON : + dialog_options & GHOST_DialogWarning ? TD_WARNING_ICON : + TD_INFORMATION_ICON); config.pszWindowTitle = L"Blender"; config.pszMainInstruction = title_16; config.pszContent = message_16; diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp index 7af42e0c5bb..9fcad8aabf7 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cpp +++ b/intern/ghost/intern/GHOST_SystemX11.cpp @@ -1189,9 +1189,9 @@ void GHOST_SystemX11::processEvent(XEvent *xe) else { printf("Bad keycode lookup. Keysym 0x%x Status: %s\n", (unsigned int)key_sym, - (status == XLookupNone ? - "XLookupNone" : - status == XLookupKeySym ? "XLookupKeySym" : "Unknown status")); + (status == XLookupNone ? "XLookupNone" : + status == XLookupKeySym ? "XLookupKeySym" : + "Unknown status")); printf("'%.*s' %p %p\n", len, utf8_buf, xic, m_xim); } -- cgit v1.2.3