Use C++11 member initializers

This commit is contained in:
Marc Gilleron 2019-05-04 16:30:39 +01:00
parent 295374b99f
commit f0089dce8b

View File

@ -36,16 +36,10 @@ public:
}; };
struct Stats { struct Stats {
bool first; bool first = true;
uint64_t min_time; uint64_t min_time = 0;
uint64_t max_time; uint64_t max_time = 0;
uint32_t remaining_blocks; uint32_t remaining_blocks = 0;
Stats() :
first(true),
min_time(0),
max_time(0),
remaining_blocks(0) {}
}; };
struct Output { struct Output {
@ -54,14 +48,9 @@ public:
}; };
struct MeshingParams { struct MeshingParams {
bool baked_ao; bool baked_ao = true;
float baked_ao_darkness; float baked_ao_darkness = 0.75;
bool smooth_surface; bool smooth_surface = false;
MeshingParams() :
baked_ao(true),
baked_ao_darkness(0.75),
smooth_surface(false) {}
}; };
VoxelMeshUpdater(Ref<VoxelLibrary> library, MeshingParams params); VoxelMeshUpdater(Ref<VoxelLibrary> library, MeshingParams params);