diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-07-30 09:19:19 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-07-30 09:19:19 +0300 |
commit | 93eb460dd0aca4de33bf780de76eee319c224bae (patch) | |
tree | 8ee44df80044964ee00bb1217d00623fd928d891 /source/blender/blenlib/intern | |
parent | f81a6a2ff1dc34bbffd6ed34cfc49646e1bfc5f9 (diff) |
Cleanup: clang-format (re-run after v12 version bump)
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r-- | source/blender/blenlib/intern/array_store.c | 4 | ||||
-rw-r--r-- | source/blender/blenlib/intern/fileops.c | 8 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_base_inline.c | 6 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_color.c | 10 |
4 files changed, 15 insertions, 13 deletions
diff --git a/source/blender/blenlib/intern/array_store.c b/source/blender/blenlib/intern/array_store.c index 5ad57a7bec8..ee06d8b6347 100644 --- a/source/blender/blenlib/intern/array_store.c +++ b/source/blender/blenlib/intern/array_store.c @@ -1436,8 +1436,8 @@ BArrayStore *BLI_array_store_create(uint stride, uint chunk_count) bs->info.accum_steps = BCHUNK_HASH_TABLE_ACCUMULATE_STEPS - 1; /* Triangle number, identifying now much read-ahead we need: * https://en.wikipedia.org/wiki/Triangular_number (+ 1) */ - bs->info.accum_read_ahead_len = (uint)( - (((bs->info.accum_steps * (bs->info.accum_steps + 1))) / 2) + 1); + bs->info.accum_read_ahead_len = + (uint)((((bs->info.accum_steps * (bs->info.accum_steps + 1))) / 2) + 1); bs->info.accum_read_ahead_bytes = bs->info.accum_read_ahead_len * stride; #else bs->info.accum_read_ahead_bytes = BCHUNK_HASH_LEN * stride; diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c index 1a00142ddb1..ac034d2b5cd 100644 --- a/source/blender/blenlib/intern/fileops.c +++ b/source/blender/blenlib/intern/fileops.c @@ -919,8 +919,8 @@ static int delete_soft(const char *file, const char **error_message) Class NSStringClass = objc_getClass("NSString"); SEL stringWithUTF8StringSel = sel_registerName("stringWithUTF8String:"); - id pathString = ((id(*)(Class, SEL, const char *))objc_msgSend)( - NSStringClass, stringWithUTF8StringSel, file); + id pathString = (( + id(*)(Class, SEL, const char *))objc_msgSend)(NSStringClass, stringWithUTF8StringSel, file); Class NSFileManagerClass = objc_getClass("NSFileManager"); SEL defaultManagerSel = sel_registerName("defaultManager"); @@ -931,8 +931,8 @@ static int delete_soft(const char *file, const char **error_message) id nsurl = ((id(*)(Class, SEL, id))objc_msgSend)(NSURLClass, fileURLWithPathSel, pathString); SEL trashItemAtURLSel = sel_registerName("trashItemAtURL:resultingItemURL:error:"); - BOOL deleteSuccessful = ((BOOL(*)(id, SEL, id, id, id))objc_msgSend)( - fileManager, trashItemAtURLSel, nsurl, nil, nil); + BOOL deleteSuccessful = (( + BOOL(*)(id, SEL, id, id, id))objc_msgSend)(fileManager, trashItemAtURLSel, nsurl, nil, nil); if (deleteSuccessful) { ret = 0; diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c index 0a213fa8696..6e3846e59c6 100644 --- a/source/blender/blenlib/intern/math_base_inline.c +++ b/source/blender/blenlib/intern/math_base_inline.c @@ -807,9 +807,9 @@ MINLINE unsigned char unit_float_to_uchar_clamp(float val) MINLINE unsigned short unit_float_to_ushort_clamp(float val) { - return (unsigned short)((val >= 1.0f - 0.5f / 65535) ? - 65535 : - (val <= 0.0f) ? 0 : (val * 65535.0f + 0.5f)); + return (unsigned short)((val >= 1.0f - 0.5f / 65535) ? 65535 : + (val <= 0.0f) ? 0 : + (val * 65535.0f + 0.5f)); } #define unit_float_to_ushort_clamp(val) \ ((CHECK_TYPE_INLINE(val, float)), unit_float_to_ushort_clamp(val)) diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c index da97e697f2f..14eb78648e0 100644 --- a/source/blender/blenlib/intern/math_color.c +++ b/source/blender/blenlib/intern/math_color.c @@ -685,10 +685,12 @@ static void blackbody_temperature_to_rgb(float rgb[3], float t) rgb[2] = 0.0f; } else { - int i = (t >= 6365.0f) ? - 5 : - (t >= 3315.0f) ? 4 : - (t >= 1902.0f) ? 3 : (t >= 1449.0f) ? 2 : (t >= 1167.0f) ? 1 : 0; + int i = (t >= 6365.0f) ? 5 : + (t >= 3315.0f) ? 4 : + (t >= 1902.0f) ? 3 : + (t >= 1449.0f) ? 2 : + (t >= 1167.0f) ? 1 : + 0; const float *r = blackbody_table_r[i]; const float *g = blackbody_table_g[i]; |