From f0089dce8bae923ec3a717a789f8e4a650799a6b Mon Sep 17 00:00:00 2001 From: Marc Gilleron Date: Sat, 4 May 2019 16:30:39 +0100 Subject: [PATCH] Use C++11 member initializers --- terrain/voxel_mesh_updater.h | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/terrain/voxel_mesh_updater.h b/terrain/voxel_mesh_updater.h index 859b2c0a..5dcf535d 100644 --- a/terrain/voxel_mesh_updater.h +++ b/terrain/voxel_mesh_updater.h @@ -36,16 +36,10 @@ public: }; struct Stats { - bool first; - uint64_t min_time; - uint64_t max_time; - uint32_t remaining_blocks; - - Stats() : - first(true), - min_time(0), - max_time(0), - remaining_blocks(0) {} + bool first = true; + uint64_t min_time = 0; + uint64_t max_time = 0; + uint32_t remaining_blocks = 0; }; struct Output { @@ -54,14 +48,9 @@ public: }; struct MeshingParams { - bool baked_ao; - float baked_ao_darkness; - bool smooth_surface; - - MeshingParams() : - baked_ao(true), - baked_ao_darkness(0.75), - smooth_surface(false) {} + bool baked_ao = true; + float baked_ao_darkness = 0.75; + bool smooth_surface = false; }; VoxelMeshUpdater(Ref library, MeshingParams params);