Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-11-09 14:08:51 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-11-09 14:08:51 +0300
commit203de0bbf05ed3952d1ee6c67cfc2d3de978b8e2 (patch)
tree25ceedbcdb4b936750050e02b289efea348591f1 /intern/cycles/util
parent2330cadb0fbdc31b2eed415996e376a830c1e1b9 (diff)
Cycles: Cleanup, space after (void)
It was used in like 95% of places.
Diffstat (limited to 'intern/cycles/util')
-rw-r--r--intern/cycles/util/util_atomic.h2
-rw-r--r--intern/cycles/util/util_defines.h10
-rw-r--r--intern/cycles/util/util_guarded_allocator.h2
-rw-r--r--intern/cycles/util/util_logging.h2
-rw-r--r--intern/cycles/util/util_stack_allocator.h2
-rw-r--r--intern/cycles/util/util_system.cpp4
6 files changed, 11 insertions, 11 deletions
diff --git a/intern/cycles/util/util_atomic.h b/intern/cycles/util/util_atomic.h
index b1396300329..477b667a6fe 100644
--- a/intern/cycles/util/util_atomic.h
+++ b/intern/cycles/util/util_atomic.h
@@ -29,7 +29,7 @@
#define atomic_fetch_and_dec_uint32(p) atomic_fetch_and_add_uint32((p), -1)
#define CCL_LOCAL_MEM_FENCE 0
-#define ccl_barrier(flags) (void)0
+#define ccl_barrier(flags) ((void) 0)
#else /* __KERNEL_GPU__ */
diff --git a/intern/cycles/util/util_defines.h b/intern/cycles/util/util_defines.h
index 29eab4bbc6a..429cfe647ef 100644
--- a/intern/cycles/util/util_defines.h
+++ b/intern/cycles/util/util_defines.h
@@ -72,7 +72,7 @@
# if defined(__GNUC__) && (__GNUC__ >= 7) /* gcc7.0+ only */
# define ATTR_FALLTHROUGH __attribute__((fallthrough))
# else
-# define ATTR_FALLTHROUGH ((void)0)
+# define ATTR_FALLTHROUGH ((void) 0)
# endif
#endif /* __KERNEL_GPU__ */
@@ -104,14 +104,14 @@ template<typename T> static inline T decltype_helper(T x) { return x; }
#define CHECK_TYPE(var, type) { \
TYPEOF(var) *__tmp; \
__tmp = (type *)NULL; \
- (void)__tmp; \
-} (void)0
+ (void) __tmp; \
+} (void) 0
#define CHECK_TYPE_PAIR(var_a, var_b) { \
TYPEOF(var_a) *__tmp; \
__tmp = (typeof(var_b) *)NULL; \
- (void)__tmp; \
-} (void)0
+ (void) __tmp; \
+} (void) 0
#else
# define CHECK_TYPE(var, type)
# define CHECK_TYPE_PAIR(var_a, var_b)
diff --git a/intern/cycles/util/util_guarded_allocator.h b/intern/cycles/util/util_guarded_allocator.h
index c02aed93aa2..2c6f1790fd0 100644
--- a/intern/cycles/util/util_guarded_allocator.h
+++ b/intern/cycles/util/util_guarded_allocator.h
@@ -47,7 +47,7 @@ public:
T *allocate(size_t n, const void *hint = 0)
{
- (void)hint;
+ (void) hint;
size_t size = n * sizeof(T);
util_guarded_mem_alloc(size);
if(n == 0) {
diff --git a/intern/cycles/util/util_logging.h b/intern/cycles/util/util_logging.h
index 01a9b62ad93..f66d7c92dcc 100644
--- a/intern/cycles/util/util_logging.h
+++ b/intern/cycles/util/util_logging.h
@@ -41,7 +41,7 @@ public:
void operator&(StubStream&) { }
};
-# define LOG_SUPPRESS() (true) ? (void) 0 : LogMessageVoidify() & StubStream()
+# define LOG_SUPPRESS() (true) ? ((void) 0) : LogMessageVoidify() & StubStream()
# define LOG(severity) LOG_SUPPRESS()
# define VLOG(severity) LOG_SUPPRESS()
#endif
diff --git a/intern/cycles/util/util_stack_allocator.h b/intern/cycles/util/util_stack_allocator.h
index 79a535bd170..6b52e73ee4e 100644
--- a/intern/cycles/util/util_stack_allocator.h
+++ b/intern/cycles/util/util_stack_allocator.h
@@ -53,7 +53,7 @@ public:
T *allocate(size_t n, const void *hint = 0)
{
- (void)hint;
+ (void) hint;
if(n == 0) {
return NULL;
}
diff --git a/intern/cycles/util/util_system.cpp b/intern/cycles/util/util_system.cpp
index 1b039888452..34f428f111c 100644
--- a/intern/cycles/util/util_system.cpp
+++ b/intern/cycles/util/util_system.cpp
@@ -52,14 +52,14 @@ int system_cpu_group_thread_count(int group)
util_windows_init_numa_groups();
return GetActiveProcessorCount(group);
#elif defined(__APPLE__)
- (void)group;
+ (void) group;
int count;
size_t len = sizeof(count);
int mib[2] = { CTL_HW, HW_NCPU };
sysctl(mib, 2, &count, &len, NULL, 0);
return count;
#else
- (void)group;
+ (void) group;
return sysconf(_SC_NPROCESSORS_ONLN);
#endif
}