[Bf-blender-cvs] [2330cadb0fb] master: Cycles: Cleanup, don't use strict C prototypes
Sergey Sharybin
noreply at git.blender.org
Fri Nov 9 14:33:47 CET 2018
Commit: 2330cadb0fbdc31b2eed415996e376a830c1e1b9
Author: Sergey Sharybin
Date: Fri Nov 9 12:01:38 2018 +0100
Branches: master
https://developer.blender.org/rB2330cadb0fbdc31b2eed415996e376a830c1e1b9
Cycles: Cleanup, don't use strict C prototypes
Those are more like a legacy of language, which is not
needed in C++.
===================================================================
M intern/cycles/blender/blender_logging.cpp
M intern/cycles/device/device.h
M intern/cycles/device/device_cpu.cpp
M intern/cycles/device/device_cuda.cpp
M intern/cycles/device/device_intern.h
M intern/cycles/device/device_opencl.cpp
M intern/cycles/device/device_task.h
M intern/cycles/util/util_avxf.h
M intern/cycles/util/util_guarded_allocator.cpp
M intern/cycles/util/util_guarded_allocator.h
M intern/cycles/util/util_logging.cpp
M intern/cycles/util/util_logging.h
M intern/cycles/util/util_progress.h
M intern/cycles/util/util_ssef.h
M intern/cycles/util/util_thread.cpp
M intern/cycles/util/util_thread.h
M intern/cycles/util/util_types_float3.h
M intern/cycles/util/util_types_float3_impl.h
M intern/cycles/util/util_types_float4.h
M intern/cycles/util/util_types_float4_impl.h
M intern/cycles/util/util_types_float8.h
M intern/cycles/util/util_types_float8_impl.h
M intern/cycles/util/util_types_int3.h
M intern/cycles/util/util_types_int3_impl.h
M intern/cycles/util/util_types_int4.h
M intern/cycles/util/util_types_int4_impl.h
M intern/cycles/util/util_vector.h
M intern/cycles/util/util_view.cpp
M intern/cycles/util/util_view.h
===================================================================
diff --git a/intern/cycles/blender/blender_logging.cpp b/intern/cycles/blender/blender_logging.cpp
index d0f82e37662..3fca4efd097 100644
--- a/intern/cycles/blender/blender_logging.cpp
+++ b/intern/cycles/blender/blender_logging.cpp
@@ -22,7 +22,7 @@ void CCL_init_logging(const char *argv0)
ccl::util_logging_init(argv0);
}
-void CCL_start_debug_logging(void)
+void CCL_start_debug_logging()
{
ccl::util_logging_start();
}
diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h
index f49915bc40d..f3fb338e638 100644
--- a/intern/cycles/device/device.h
+++ b/intern/cycles/device/device.h
@@ -181,7 +181,7 @@ public:
/* Convert the requested features structure to a build options,
* which could then be passed to compilers.
*/
- string get_build_options(void) const
+ string get_build_options() const
{
string build_options = "";
if(experimental) {
@@ -240,8 +240,8 @@ std::ostream& operator <<(std::ostream &os,
/* Device */
struct DeviceDrawParams {
- function<void(void)> bind_display_space_shader_cb;
- function<void(void)> unbind_display_space_shader_cb;
+ function<void()> bind_display_space_shader_cb;
+ function<void()> unbind_display_space_shader_cb;
};
class Device {
diff --git a/intern/cycles/device/device_cpu.cpp b/intern/cycles/device/device_cpu.cpp
index bb5e9980457..9b37f4773bb 100644
--- a/intern/cycles/device/device_cpu.cpp
+++ b/intern/cycles/device/device_cpu.cpp
@@ -1065,7 +1065,7 @@ void device_cpu_info(vector<DeviceInfo>& devices)
devices.insert(devices.begin(), info);
}
-string device_cpu_capabilities(void)
+string device_cpu_capabilities()
{
string capabilities = "";
capabilities += system_cpu_support_sse2() ? "SSE2 " : "";
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index a52e77f707b..d338a565a02 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -73,12 +73,12 @@ const char *cuewErrorString(CUresult result)
return error.c_str();
}
-const char *cuewCompilerPath(void)
+const char *cuewCompilerPath()
{
return CYCLES_CUDA_NVCC_EXECUTABLE;
}
-int cuewCompilerVersion(void)
+int cuewCompilerVersion()
{
return (CUDA_VERSION / 100) + (CUDA_VERSION % 100 / 10);
}
@@ -2355,7 +2355,7 @@ int2 CUDASplitKernel::split_kernel_global_size(device_memory& kg, device_memory&
return global_size;
}
-bool device_cuda_init(void)
+bool device_cuda_init()
{
#ifdef WITH_CUDA_DYNLOAD
static bool initialized = false;
@@ -2497,7 +2497,7 @@ void device_cuda_info(vector<DeviceInfo>& devices)
devices.insert(devices.end(), display_devices.begin(), display_devices.end());
}
-string device_cuda_capabilities(void)
+string device_cuda_capabilities()
{
CUresult result = device_cuda_safe_init();
if(result != CUDA_SUCCESS) {
diff --git a/intern/cycles/device/device_intern.h b/intern/cycles/device/device_intern.h
index d5a96c2b82b..e6495c2bff3 100644
--- a/intern/cycles/device/device_intern.h
+++ b/intern/cycles/device/device_intern.h
@@ -22,9 +22,9 @@ CCL_NAMESPACE_BEGIN
class Device;
Device *device_cpu_create(DeviceInfo& info, Stats &stats, bool background);
-bool device_opencl_init(void);
+bool device_opencl_init();
Device *device_opencl_create(DeviceInfo& info, Stats &stats, bool background);
-bool device_cuda_init(void);
+bool device_cuda_init();
Device *device_cuda_create(DeviceInfo& info, Stats &stats, bool background);
Device *device_network_create(DeviceInfo& info, Stats &stats, const char *address);
Device *device_multi_create(DeviceInfo& info, Stats &stats, bool background);
@@ -34,9 +34,9 @@ void device_opencl_info(vector<DeviceInfo>& devices);
void device_cuda_info(vector<DeviceInfo>& devices);
void device_network_info(vector<DeviceInfo>& devices);
-string device_cpu_capabilities(void);
-string device_opencl_capabilities(void);
-string device_cuda_capabilities(void);
+string device_cpu_capabilities();
+string device_opencl_capabilities();
+string device_cuda_capabilities();
CCL_NAMESPACE_END
diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp
index 036f8a2e6e7..71410f80d57 100644
--- a/intern/cycles/device/device_opencl.cpp
+++ b/intern/cycles/device/device_opencl.cpp
@@ -44,7 +44,7 @@ Device *device_opencl_create(DeviceInfo& info, Stats &stats, bool background)
}
}
-bool device_opencl_init(void)
+bool device_opencl_init()
{
static bool initialized = false;
static bool result = false;
@@ -146,7 +146,7 @@ void device_opencl_info(vector<DeviceInfo>& devices)
}
}
-string device_opencl_capabilities(void)
+string device_opencl_capabilities()
{
if(OpenCLInfo::device_type() == 0) {
return "All OpenCL devices are forced to be OFF";
diff --git a/intern/cycles/device/device_task.h b/intern/cycles/device/device_task.h
index db27470a03f..861014373b3 100644
--- a/intern/cycles/device/device_task.h
+++ b/intern/cycles/device/device_task.h
@@ -64,7 +64,7 @@ public:
function<void(long, int)> update_progress_sample;
function<void(RenderTile&)> update_tile_sample;
function<void(RenderTile&)> release_tile;
- function<bool(void)> get_cancel;
+ function<bool()> get_cancel;
function<void(RenderTile*, Device*)> map_neighbor_tiles;
function<void(RenderTile*, Device*)> unmap_neighbor_tiles;
diff --git a/intern/cycles/util/util_avxf.h b/intern/cycles/util/util_avxf.h
index 0c15ba5cbbd..f00c722f25b 100644
--- a/intern/cycles/util/util_avxf.h
+++ b/intern/cycles/util/util_avxf.h
@@ -40,8 +40,8 @@ struct avxf
__forceinline avxf(const __m256 a) : m256(a) {}
__forceinline avxf(const __m256i a) : m256(_mm256_castsi256_ps (a)) {}
- __forceinline operator const __m256&(void) const { return m256; }
- __forceinline operator __m256&(void) { return m256; }
+ __forceinline operator const __m256&() const { return m256; }
+ __forceinline operator __m256&() { return m256; }
__forceinline avxf (float a) : m256(_mm256_set1_ps(a)) {}
diff --git a/intern/cycles/util/util_guarded_allocator.cpp b/intern/cycles/util/util_guarded_allocator.cpp
index 54fa6a80df5..ae1d217c54f 100644
--- a/intern/cycles/util/util_guarded_allocator.cpp
+++ b/intern/cycles/util/util_guarded_allocator.cpp
@@ -35,12 +35,12 @@ void util_guarded_mem_free(size_t n)
/* Public API. */
-size_t util_guarded_get_mem_used(void)
+size_t util_guarded_get_mem_used()
{
return global_stats.mem_used;
}
-size_t util_guarded_get_mem_peak(void)
+size_t util_guarded_get_mem_peak()
{
return global_stats.mem_peak;
}
diff --git a/intern/cycles/util/util_guarded_allocator.h b/intern/cycles/util/util_guarded_allocator.h
index 87c1526dee4..c02aed93aa2 100644
--- a/intern/cycles/util/util_guarded_allocator.h
+++ b/intern/cycles/util/util_guarded_allocator.h
@@ -158,8 +158,8 @@ public:
};
/* Get memory usage and peak from the guarded STL allocator. */
-size_t util_guarded_get_mem_used(void);
-size_t util_guarded_get_mem_peak(void);
+size_t util_guarded_get_mem_used();
+size_t util_guarded_get_mem_peak();
/* Call given function and keep track if it runs out of memory.
*
diff --git a/intern/cycles/util/util_logging.cpp b/intern/cycles/util/util_logging.cpp
index f38683bf7de..b0922db32fb 100644
--- a/intern/cycles/util/util_logging.cpp
+++ b/intern/cycles/util/util_logging.cpp
@@ -45,7 +45,7 @@ void util_logging_init(const char *argv0)
#endif
}
-void util_logging_start(void)
+void util_logging_start()
{
#ifdef WITH_CYCLES_LOGGING
using CYCLES_GFLAGS_NAMESPACE::SetCommandLineOption;
diff --git a/intern/cycles/util/util_logging.h b/intern/cycles/util/util_logging.h
index 4a5c3cd15bf..01a9b62ad93 100644
--- a/intern/cycles/util/util_logging.h
+++ b/intern/cycles/util/util_logging.h
@@ -52,7 +52,7 @@ struct int2;
struct float3;
void util_logging_init(const char *argv0);
-void util_logging_start(void);
+void util_logging_start();
void util_logging_verbosity_set(int verbosity);
std::ostream& operator <<(std::ostream &os,
diff --git a/intern/cycles/util/util_progress.h b/intern/cycles/util/util_progress.h
index 453af7de36b..4ed9ebd60ff 100644
--- a/intern/cycles/util/util_progress.h
+++ b/intern/cycles/util/util_progress.h
@@ -114,7 +114,7 @@ public:
return cancel_message;
}
- void set_cancel_callback(function<void(void)> function)
+ void set_cancel_callback(function<void()> function)
{
cancel_cb = function;
}
@@ -323,7 +323,7 @@ public:
}
}
- void set_update_callback(function<void(void)> function)
+ void set_update_callback(function<void()> function)
{
update_cb = function;
}
@@ -331,8 +331,8 @@ public:
protected:
thread_mutex progress_mutex;
thread_mutex update_mutex;
- function<void(void)> update_cb;
- function<void(void)> cancel_cb;
+ function<void()> update_cb;
+ function<void()> cancel_cb;
/* pixel_samples counts how many samples have been rendered over all pixel, not just per pixel.
* This makes the progress estimate more accurate when tiles with different sizes are used.
diff --git a/intern/cycles/util/util_ssef.h b/intern/cycles/util/util_ssef.h
index b5623860e33..66670c9a779 100644
--- a/intern/cycles/util/util_ssef.h
+++ b/intern/cycles/util/util_ssef.h
@@ -44,8 +44,8 @@ struct ssef
__forceinline ssef& operator=(const ssef& other) { m128 = other.m128; return *this; }
__forceinline ssef(const __m128 a) : m128(a) {}
- __forceinline operator const __m128&(void) const { return m128; }
- __forceinline operator __m128&(void) { return m128; }
+ __forceinline operator const __m128&() const { return m128; }
+ __forceinline operator __m128&() { return m128; }
__forceinline ssef (float a) : m128(_mm_set1_ps(a)) {}
__forceinline ssef (float a, float b, float c, float d) : m128(_mm_setr_ps(a, b, c, d)) {}
@@ -517,12 +517,12 @@ ccl_device_inline float len3(const ssef& a)
/* faster version for SSSE3 */
typedef ssei shuffle_swap_t;
-ccl_device_inline shuffle_swap_t shuffle_swap_identity(void)
+ccl_device_inline shuffle_swap_t shuffle_swap_identity()
{
return _mm_set_epi8(15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0);
}
-ccl_device_inline shuffle_swap_t shuffle_swap_swap(void)
+ccl_device_inline shuffle_swap_t shuf
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list