From 24ac1d7fbcc15509098a3794cbdb075f304b1d77 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sat, 1 Nov 2014 22:55:43 +0200 Subject: [PATCH] Fix coding style --- builtin/voxelworld/voxelworld.cpp | 6 +++--- src/impl/mesh.cpp | 9 ++------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/builtin/voxelworld/voxelworld.cpp b/builtin/voxelworld/voxelworld.cpp index b77c67e..c327049 100644 --- a/builtin/voxelworld/voxelworld.cpp +++ b/builtin/voxelworld/voxelworld.cpp @@ -1162,7 +1162,7 @@ struct Module: public interface::Module, public voxelworld::Interface m_voxel_reg->deserialize(voxel_reg_data);*/ // Start up normally - on_start(); + on_start(); } void on_tick(const interface::TickEvent &event) @@ -1209,9 +1209,9 @@ struct Module: public interface::Module, public voxelworld::Interface packet.sender, PV3I_PARAMS(section_p)); }*/ - // Interface + // Interface - void create_instance(SceneReference scene_ref, const pv::Region ®ion) + void create_instance(SceneReference scene_ref, const pv::Region ®ion) { auto it = m_instances.find(scene_ref); // TODO: Is an exception the best way to handle this? diff --git a/src/impl/mesh.cpp b/src/impl/mesh.cpp index e8c2fa3..850e59f 100644 --- a/src/impl/mesh.cpp +++ b/src/impl/mesh.cpp @@ -841,14 +841,9 @@ void generate_voxel_physics_boxes( VoxelInstance v_orig = volume_orig.getVoxelAt(x, y, z); const interface::CachedVoxelDefinition *def = voxel_reg->get_cached(v_orig); - if(!def) + if(!def){ throw Exception(ss_()+"Undefined voxel: "+itos(v_orig.get_id())); - - - - - - + } uint8_t v = (def && def->physically_solid); volume.setVoxelAt(x, y, z, v); }