From 22a6714875da2156d9a5b89781a6e2dd4effbca0 Mon Sep 17 00:00:00 2001 From: Matt Williams Date: Thu, 9 May 2013 20:56:10 +0100 Subject: [PATCH] Add a default constructor to PickResult to avoid brittle instatiation. --- library/PolyVoxCore/include/PolyVoxCore/Picking.h | 1 + library/PolyVoxCore/include/PolyVoxCore/Picking.inl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/library/PolyVoxCore/include/PolyVoxCore/Picking.h b/library/PolyVoxCore/include/PolyVoxCore/Picking.h index 15360bb0..96322ac2 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/Picking.h +++ b/library/PolyVoxCore/include/PolyVoxCore/Picking.h @@ -33,6 +33,7 @@ namespace PolyVox */ struct PickResult { + PickResult() : didHit(false) {} bool didHit; ///< Did the picking operation hit anything Vector3DInt32 hitVoxel; ///< The location of the solid voxel it hit Vector3DInt32 previousVoxel; ///< The location of the voxel before the one it hit diff --git a/library/PolyVoxCore/include/PolyVoxCore/Picking.inl b/library/PolyVoxCore/include/PolyVoxCore/Picking.inl index 3bbbdaf3..bb23af2b 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/Picking.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/Picking.inl @@ -42,7 +42,7 @@ namespace PolyVox public: RaycastPickingFunctor(const typename VolumeType::VoxelType& emptyVoxelExample) :m_emptyVoxelExample(emptyVoxelExample) - ,m_result{false} + ,m_result() { }