From a7d7f645546a6952a94340b6edd30cabefbf9d4d Mon Sep 17 00:00:00 2001 From: David Williams Date: Tue, 27 Nov 2012 22:53:36 +0100 Subject: [PATCH] getEnclosedRegion now return a const ref. --- library/PolyVoxCore/include/PolyVoxCore/BaseVolume.h | 2 +- library/PolyVoxCore/include/PolyVoxCore/BaseVolume.inl | 2 +- library/PolyVoxCore/include/PolyVoxCore/MaterialDensityPair.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library/PolyVoxCore/include/PolyVoxCore/BaseVolume.h b/library/PolyVoxCore/include/PolyVoxCore/BaseVolume.h index 8397a30c..2d5f4301 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/BaseVolume.h +++ b/library/PolyVoxCore/include/PolyVoxCore/BaseVolume.h @@ -125,7 +125,7 @@ namespace PolyVox /// Gets the value used for voxels which are outside the volume VoxelType getBorderValue(void) const; /// Gets a Region representing the extents of the Volume. - Region getEnclosingRegion(void) const; + const Region& getEnclosingRegion(void) const; /// Gets the width of the volume in voxels. int32_t getWidth(void) const; /// Gets the height of the volume in voxels. diff --git a/library/PolyVoxCore/include/PolyVoxCore/BaseVolume.inl b/library/PolyVoxCore/include/PolyVoxCore/BaseVolume.inl index 80720d37..3e41528d 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/BaseVolume.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/BaseVolume.inl @@ -84,7 +84,7 @@ namespace PolyVox /// \return A Region representing the extent of the volume. //////////////////////////////////////////////////////////////////////////////// template - Region BaseVolume::getEnclosingRegion(void) const + const Region& BaseVolume::getEnclosingRegion(void) const { return m_regValidRegion; } diff --git a/library/PolyVoxCore/include/PolyVoxCore/MaterialDensityPair.h b/library/PolyVoxCore/include/PolyVoxCore/MaterialDensityPair.h index ac3b3a81..66baf66e 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/MaterialDensityPair.h +++ b/library/PolyVoxCore/include/PolyVoxCore/MaterialDensityPair.h @@ -44,7 +44,7 @@ namespace PolyVox MaterialDensityPair() : m_uMaterial(0), m_uDensity(0) {} // FIXME - This is a bit odd... we need to allow the MaterialDensityPair to be initialised with a single integer - // and PolyVox often initialises voxels by calling VoxelType(0). Is there a better way we should handle this? + // because PolyVox often initialises voxels by calling VoxelType(0). Is there a better way we should handle this? MaterialDensityPair(Type tValue) : m_uMaterial(tValue), m_uDensity(tValue) {} MaterialDensityPair(Type uMaterial, Type uDensity) : m_uMaterial(uMaterial), m_uDensity(uDensity) {}