Skip to content

Commit 5a9d4fd

Browse files
brechtvlBrecht Van Lommel
authored and
Brecht Van Lommel
committed
Cleanup: Use default member initializers
1 parent ab394c8 commit 5a9d4fd

File tree

1 file changed

+20
-36
lines changed

1 file changed

+20
-36
lines changed

intern/cycles/device/device.h

+20-36
Original file line numberDiff line numberDiff line change
@@ -78,46 +78,30 @@ enum MetalRTSetting {
7878

7979
class DeviceInfo {
8080
public:
81-
DeviceType type;
81+
DeviceType type = DEVICE_CPU;
8282
string description;
83-
string id; /* used for user preferences, should stay fixed with changing hardware config */
84-
int num;
85-
bool display_device; /* GPU is used as a display device. */
86-
bool has_nanovdb; /* Support NanoVDB volumes. */
87-
bool has_mnee; /* Support MNEE. */
88-
bool has_osl; /* Support Open Shading Language. */
89-
bool has_guiding; /* Support path guiding. */
90-
bool has_profiling; /* Supports runtime collection of profiling info. */
91-
bool has_peer_memory; /* GPU has P2P access to memory of another GPU. */
92-
bool has_gpu_queue; /* Device supports GPU queue. */
93-
bool use_hardware_raytracing; /* Use hardware instructions to accelerate ray tracing. */
94-
bool use_metalrt_by_default; /* Use MetalRT by default. */
95-
KernelOptimizationLevel kernel_optimization_level; /* Optimization level applied to path tracing
96-
* kernels (Metal only). */
97-
DenoiserTypeMask denoisers; /* Supported denoiser types. */
98-
int cpu_threads;
83+
/* used for user preferences, should stay fixed with changing hardware config */
84+
string id = "CPU";
85+
int num = 0;
86+
bool display_device = false; /* GPU is used as a display device. */
87+
bool has_nanovdb = false; /* Support NanoVDB volumes. */
88+
bool has_mnee = true; /* Support MNEE. */
89+
bool has_osl = false; /* Support Open Shading Language. */
90+
bool has_guiding = false; /* Support path guiding. */
91+
bool has_profiling = false; /* Supports runtime collection of profiling info. */
92+
bool has_peer_memory = false; /* GPU has P2P access to memory of another GPU. */
93+
bool has_gpu_queue = false; /* Device supports GPU queue. */
94+
bool use_hardware_raytracing = false; /* Use hardware instructions to accelerate ray tracing. */
95+
bool use_metalrt_by_default = false; /* Use MetalRT by default. */
96+
KernelOptimizationLevel kernel_optimization_level =
97+
KERNEL_OPTIMIZATION_LEVEL_FULL; /* Optimization level applied to path tracing
98+
* kernels (Metal only). */
99+
DenoiserTypeMask denoisers = DENOISER_NONE; /* Supported denoiser types. */
100+
int cpu_threads = 0;
99101
vector<DeviceInfo> multi_devices;
100102
string error_msg;
101103

102-
DeviceInfo()
103-
{
104-
type = DEVICE_CPU;
105-
id = "CPU";
106-
num = 0;
107-
cpu_threads = 0;
108-
display_device = false;
109-
has_nanovdb = false;
110-
has_mnee = true;
111-
has_osl = false;
112-
has_guiding = false;
113-
has_profiling = false;
114-
has_peer_memory = false;
115-
has_gpu_queue = false;
116-
use_hardware_raytracing = false;
117-
use_metalrt_by_default = false;
118-
kernel_optimization_level = KERNEL_OPTIMIZATION_LEVEL_FULL;
119-
denoisers = DENOISER_NONE;
120-
}
104+
DeviceInfo() = default;
121105

122106
bool operator==(const DeviceInfo &info) const
123107
{

0 commit comments

Comments
 (0)