Removed the assignment operator from SimpleVolume::Sampler and LargeVolume::Sampler. I had forgotten to call the base class assignment operator and this was causing problems.

Also updated the volume unit tests... at least I know now that it's helping!
This commit is contained in:
David Williams
2012-12-06 23:53:51 +01:00
parent 1f9264a9f8
commit ab6898c4c5
5 changed files with 56 additions and 39 deletions

View File

@ -177,8 +177,6 @@ namespace PolyVox
Sampler(LargeVolume<VoxelType>* volume);
~Sampler();
Sampler& operator=(const Sampler& rhs);
/// \deprecated
POLYVOX_DEPRECATED VoxelType getSubSampledVoxel(uint8_t uLevel) const;
inline VoxelType getVoxel(void) const;

View File

@ -39,21 +39,6 @@ namespace PolyVox
{
}
template <typename VoxelType>
typename LargeVolume<VoxelType>::Sampler& LargeVolume<VoxelType>::Sampler::operator=(const typename LargeVolume<VoxelType>::Sampler& rhs)
{
if(this == &rhs)
{
return *this;
}
this->mVolume = rhs.mVolume;
this->mXPosInVolume = rhs.mXPosInVolume;
this->mYPosInVolume = rhs.mYPosInVolume;
this->mZPosInVolume = rhs.mZPosInVolume;
mCurrentVoxel = rhs.mCurrentVoxel;
return *this;
}
template <typename VoxelType>
VoxelType LargeVolume<VoxelType>::Sampler::getSubSampledVoxel(uint8_t uLevel) const
{

View File

@ -87,8 +87,6 @@ namespace PolyVox
Sampler(SimpleVolume<VoxelType>* volume);
~Sampler();
Sampler& operator=(const Sampler& rhs);
/// \deprecated
POLYVOX_DEPRECATED VoxelType getSubSampledVoxel(uint8_t uLevel) const;
/// Get the value of the current voxel

View File

@ -42,21 +42,6 @@ namespace PolyVox
{
}
template <typename VoxelType>
typename SimpleVolume<VoxelType>::Sampler& SimpleVolume<VoxelType>::Sampler::operator=(const typename SimpleVolume<VoxelType>::Sampler& rhs)
{
if(this == &rhs)
{
return *this;
}
this->mVolume = rhs.mVolume;
this->mXPosInVolume = rhs.mXPosInVolume;
this->mYPosInVolume = rhs.mYPosInVolume;
this->mZPosInVolume = rhs.mZPosInVolume;
mCurrentVoxel = rhs.mCurrentVoxel;
return *this;
}
template <typename VoxelType>
VoxelType SimpleVolume<VoxelType>::Sampler::getSubSampledVoxel(uint8_t uLevel) const
{