From 19a1f997231b53d97d299e3b9fee408e32dcb70b Mon Sep 17 00:00:00 2001 From: p265186 Date: Thu, 6 Dec 2012 16:49:38 +0100 Subject: [PATCH] Compile fixes for GCC. --- .../include/PolyVoxCore/BaseVolumeSampler.inl | 2 +- .../include/PolyVoxCore/LargeVolume.inl | 16 ++++++++-------- .../include/PolyVoxCore/LargeVolumeSampler.inl | 16 ++++++++-------- .../include/PolyVoxCore/RawVolume.inl | 14 +++++++------- .../include/PolyVoxCore/RawVolumeSampler.inl | 18 +++++++++--------- .../include/PolyVoxCore/SimpleVolume.inl | 16 ++++++++-------- .../PolyVoxCore/SimpleVolumeSampler.inl | 18 +++++++++--------- 7 files changed, 50 insertions(+), 50 deletions(-) diff --git a/library/PolyVoxCore/include/PolyVoxCore/BaseVolumeSampler.inl b/library/PolyVoxCore/include/PolyVoxCore/BaseVolumeSampler.inl index b3004074..fb7fe6b1 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/BaseVolumeSampler.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/BaseVolumeSampler.inl @@ -21,7 +21,7 @@ freely, subject to the following restrictions: distribution. *******************************************************************************/ -#include "PolyVoxCore\Impl\Utility.h" +#include "PolyVoxCore/Impl/Utility.h" namespace PolyVox { diff --git a/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.inl b/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.inl index 2966b9c1..8061d74d 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.inl @@ -169,7 +169,7 @@ namespace PolyVox } else { - return getBorderValue(); + return this->getBorderValue(); } } @@ -197,12 +197,12 @@ namespace PolyVox case WrapModes::Clamp: { //Perform clamping - uXPos = (std::max)(uXPos, m_regValidRegion.getLowerX()); - uYPos = (std::max)(uYPos, m_regValidRegion.getLowerY()); - uZPos = (std::max)(uZPos, m_regValidRegion.getLowerZ()); - uXPos = (std::min)(uXPos, m_regValidRegion.getUpperX()); - uYPos = (std::min)(uYPos, m_regValidRegion.getUpperY()); - uZPos = (std::min)(uZPos, m_regValidRegion.getUpperZ()); + uXPos = (std::max)(uXPos, this->m_regValidRegion.getLowerX()); + uYPos = (std::max)(uYPos, this->m_regValidRegion.getLowerY()); + uZPos = (std::max)(uZPos, this->m_regValidRegion.getLowerZ()); + uXPos = (std::min)(uXPos, this->m_regValidRegion.getUpperX()); + uYPos = (std::min)(uYPos, this->m_regValidRegion.getUpperY()); + uZPos = (std::min)(uZPos, this->m_regValidRegion.getUpperZ()); //Get the voxel value return getVoxel(uXPos, uYPos, uZPos); @@ -210,7 +210,7 @@ namespace PolyVox } case WrapModes::Border: { - if(m_regValidRegion.containsPoint(uXPos, uYPos, uZPos)) + if(this->m_regValidRegion.containsPoint(uXPos, uYPos, uZPos)) { return getVoxel(uXPos, uYPos, uZPos); } diff --git a/library/PolyVoxCore/include/PolyVoxCore/LargeVolumeSampler.inl b/library/PolyVoxCore/include/PolyVoxCore/LargeVolumeSampler.inl index e61e2a71..97c11c9f 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/LargeVolumeSampler.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/LargeVolumeSampler.inl @@ -95,7 +95,7 @@ namespace PolyVox template VoxelType LargeVolume::Sampler::getVoxel(void) const { - if(isCurrentPositionValid()) + if(this->isCurrentPositionValid()) { return *mCurrentVoxel; } @@ -115,7 +115,7 @@ namespace PolyVox void LargeVolume::Sampler::setPosition(int32_t xPos, int32_t yPos, int32_t zPos) { // Base version updates position and validity flags. - BaseVolume::Sampler< LargeVolume >::setPosition(xPos, yPos, zPos); + BaseVolume::template Sampler< LargeVolume >::setPosition(xPos, yPos, zPos); // Then we update the voxel pointer const int32_t uXBlock = this->mXPosInVolume >> this->mVolume->m_uBlockSideLengthPower; @@ -157,7 +157,7 @@ namespace PolyVox void LargeVolume::Sampler::movePositiveX(void) { // Base version updates position and validity flags. - BaseVolume::Sampler< LargeVolume >::movePositiveX(); + BaseVolume::template Sampler< LargeVolume >::movePositiveX(); // Then we update the voxel pointer if((this->mXPosInVolume) % this->mVolume->m_uBlockSideLength != 0) @@ -176,7 +176,7 @@ namespace PolyVox void LargeVolume::Sampler::movePositiveY(void) { // Base version updates position and validity flags. - BaseVolume::Sampler< LargeVolume >::movePositiveY(); + BaseVolume::template Sampler< LargeVolume >::movePositiveY(); // Then we update the voxel pointer if((this->mYPosInVolume) % this->mVolume->m_uBlockSideLength != 0) @@ -195,7 +195,7 @@ namespace PolyVox void LargeVolume::Sampler::movePositiveZ(void) { // Base version updates position and validity flags. - BaseVolume::Sampler< LargeVolume >::movePositiveZ(); + BaseVolume::template Sampler< LargeVolume >::movePositiveZ(); // Then we update the voxel pointer if((this->mZPosInVolume) % this->mVolume->m_uBlockSideLength != 0) @@ -214,7 +214,7 @@ namespace PolyVox void LargeVolume::Sampler::moveNegativeX(void) { // Base version updates position and validity flags. - BaseVolume::Sampler< LargeVolume >::moveNegativeX(); + BaseVolume::template Sampler< LargeVolume >::moveNegativeX(); // Then we update the voxel pointer if((this->mXPosInVolume + 1) % this->mVolume->m_uBlockSideLength != 0) @@ -233,7 +233,7 @@ namespace PolyVox void LargeVolume::Sampler::moveNegativeY(void) { // Base version updates position and validity flags. - BaseVolume::Sampler< LargeVolume >::moveNegativeY(); + BaseVolume::template Sampler< LargeVolume >::moveNegativeY(); // Then we update the voxel pointer if((this->mYPosInVolume + 1) % this->mVolume->m_uBlockSideLength != 0) @@ -252,7 +252,7 @@ namespace PolyVox void LargeVolume::Sampler::moveNegativeZ(void) { // Base version updates position and validity flags. - BaseVolume::Sampler< LargeVolume >::moveNegativeZ(); + BaseVolume::template Sampler< LargeVolume >::moveNegativeZ(); // Then we update the voxel pointer if((this->mZPosInVolume + 1) % this->mVolume->m_uBlockSideLength != 0) diff --git a/library/PolyVoxCore/include/PolyVoxCore/RawVolume.inl b/library/PolyVoxCore/include/PolyVoxCore/RawVolume.inl index e1188738..1fafad5a 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/RawVolume.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/RawVolume.inl @@ -160,12 +160,12 @@ namespace PolyVox case WrapModes::Clamp: { //Perform clamping - uXPos = (std::max)(uXPos, m_regValidRegion.getLowerX()); - uYPos = (std::max)(uYPos, m_regValidRegion.getLowerY()); - uZPos = (std::max)(uZPos, m_regValidRegion.getLowerZ()); - uXPos = (std::min)(uXPos, m_regValidRegion.getUpperX()); - uYPos = (std::min)(uYPos, m_regValidRegion.getUpperY()); - uZPos = (std::min)(uZPos, m_regValidRegion.getUpperZ()); + uXPos = (std::max)(uXPos, this->m_regValidRegion.getLowerX()); + uYPos = (std::max)(uYPos, this->m_regValidRegion.getLowerY()); + uZPos = (std::max)(uZPos, this->m_regValidRegion.getLowerZ()); + uXPos = (std::min)(uXPos, this->m_regValidRegion.getUpperX()); + uYPos = (std::min)(uYPos, this->m_regValidRegion.getUpperY()); + uZPos = (std::min)(uZPos, this->m_regValidRegion.getUpperZ()); //Get the voxel value return getVoxel(uXPos, uYPos, uZPos); @@ -173,7 +173,7 @@ namespace PolyVox } case WrapModes::Border: { - if(m_regValidRegion.containsPoint(uXPos, uYPos, uZPos)) + if(this->m_regValidRegion.containsPoint(uXPos, uYPos, uZPos)) { return getVoxel(uXPos, uYPos, uZPos); } diff --git a/library/PolyVoxCore/include/PolyVoxCore/RawVolumeSampler.inl b/library/PolyVoxCore/include/PolyVoxCore/RawVolumeSampler.inl index 6dbffedd..1f4b5864 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/RawVolumeSampler.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/RawVolumeSampler.inl @@ -45,7 +45,7 @@ namespace PolyVox template VoxelType RawVolume::Sampler::getVoxel(void) const { - if(isCurrentPositionValid()) + if(this->isCurrentPositionValid()) { return *mCurrentVoxel; } @@ -65,7 +65,7 @@ namespace PolyVox void RawVolume::Sampler::setPosition(int32_t xPos, int32_t yPos, int32_t zPos) { // Base version updates position and validity flags. - BaseVolume::Sampler< RawVolume >::setPosition(xPos, yPos, zPos); + BaseVolume::template Sampler< RawVolume >::setPosition(xPos, yPos, zPos); // Then we update the voxel pointer const Vector3DInt32& v3dLowerCorner = this->mVolume->m_regValidRegion.getLowerCorner(); @@ -84,7 +84,7 @@ namespace PolyVox bool RawVolume::Sampler::setVoxel(VoxelType tValue) { //return m_bIsCurrentPositionValid ? *mCurrentVoxel : this->mVolume->getBorderValue(); - if(m_bIsCurrentPositionValidInX && m_bIsCurrentPositionValidInY && m_bIsCurrentPositionValidInZ) + if(this->m_bIsCurrentPositionValidInX && this->m_bIsCurrentPositionValidInY && this->m_bIsCurrentPositionValidInZ) { *mCurrentVoxel = tValue; return true; @@ -99,7 +99,7 @@ namespace PolyVox void RawVolume::Sampler::movePositiveX(void) { // Base version updates position and validity flags. - BaseVolume::Sampler< RawVolume >::movePositiveX(); + BaseVolume::template Sampler< RawVolume >::movePositiveX(); // Then we update the voxel pointer ++mCurrentVoxel; @@ -109,7 +109,7 @@ namespace PolyVox void RawVolume::Sampler::movePositiveY(void) { // Base version updates position and validity flags. - BaseVolume::Sampler< RawVolume >::movePositiveY(); + BaseVolume::template Sampler< RawVolume >::movePositiveY(); // Then we update the voxel pointer mCurrentVoxel += this->mVolume->getWidth(); @@ -119,7 +119,7 @@ namespace PolyVox void RawVolume::Sampler::movePositiveZ(void) { // Base version updates position and validity flags. - BaseVolume::Sampler< RawVolume >::movePositiveZ(); + BaseVolume::template Sampler< RawVolume >::movePositiveZ(); // Then we update the voxel pointer mCurrentVoxel += this->mVolume->getWidth() * this->mVolume->getHeight(); @@ -129,7 +129,7 @@ namespace PolyVox void RawVolume::Sampler::moveNegativeX(void) { // Base version updates position and validity flags. - BaseVolume::Sampler< RawVolume >::moveNegativeX(); + BaseVolume::template Sampler< RawVolume >::moveNegativeX(); // Then we update the voxel pointer --mCurrentVoxel; @@ -139,7 +139,7 @@ namespace PolyVox void RawVolume::Sampler::moveNegativeY(void) { // Base version updates position and validity flags. - BaseVolume::Sampler< RawVolume >::moveNegativeY(); + BaseVolume::template Sampler< RawVolume >::moveNegativeY(); // Then we update the voxel pointer mCurrentVoxel -= this->mVolume->getWidth(); @@ -149,7 +149,7 @@ namespace PolyVox void RawVolume::Sampler::moveNegativeZ(void) { // Base version updates position and validity flags. - BaseVolume::Sampler< RawVolume >::moveNegativeZ(); + BaseVolume::template Sampler< RawVolume >::moveNegativeZ(); // Then we update the voxel pointer mCurrentVoxel -= this->mVolume->getWidth() * this->mVolume->getHeight(); diff --git a/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.inl b/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.inl index 35a7c99c..ae90c549 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.inl @@ -130,7 +130,7 @@ namespace PolyVox } else { - return getBorderValue(); + return this->getBorderValue(); } } @@ -158,12 +158,12 @@ namespace PolyVox case WrapModes::Clamp: { //Perform clamping - uXPos = (std::max)(uXPos, m_regValidRegion.getLowerX()); - uYPos = (std::max)(uYPos, m_regValidRegion.getLowerY()); - uZPos = (std::max)(uZPos, m_regValidRegion.getLowerZ()); - uXPos = (std::min)(uXPos, m_regValidRegion.getUpperX()); - uYPos = (std::min)(uYPos, m_regValidRegion.getUpperY()); - uZPos = (std::min)(uZPos, m_regValidRegion.getUpperZ()); + uXPos = (std::max)(uXPos, this->m_regValidRegion.getLowerX()); + uYPos = (std::max)(uYPos, this->m_regValidRegion.getLowerY()); + uZPos = (std::max)(uZPos, this->m_regValidRegion.getLowerZ()); + uXPos = (std::min)(uXPos, this->m_regValidRegion.getUpperX()); + uYPos = (std::min)(uYPos, this->m_regValidRegion.getUpperY()); + uZPos = (std::min)(uZPos, this->m_regValidRegion.getUpperZ()); //Get the voxel value return getVoxel(uXPos, uYPos, uZPos); @@ -171,7 +171,7 @@ namespace PolyVox } case WrapModes::Border: { - if(m_regValidRegion.containsPoint(uXPos, uYPos, uZPos)) + if(this->m_regValidRegion.containsPoint(uXPos, uYPos, uZPos)) { return getVoxel(uXPos, uYPos, uZPos); } diff --git a/library/PolyVoxCore/include/PolyVoxCore/SimpleVolumeSampler.inl b/library/PolyVoxCore/include/PolyVoxCore/SimpleVolumeSampler.inl index 85ce8c10..97842995 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/SimpleVolumeSampler.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/SimpleVolumeSampler.inl @@ -101,7 +101,7 @@ namespace PolyVox template VoxelType SimpleVolume::Sampler::getVoxel(void) const { - if(isCurrentPositionValid()) + if(this->isCurrentPositionValid()) { return *mCurrentVoxel; } @@ -129,7 +129,7 @@ namespace PolyVox void SimpleVolume::Sampler::setPosition(int32_t xPos, int32_t yPos, int32_t zPos) { // Base version updates position and validity flags. - BaseVolume::Sampler< SimpleVolume >::setPosition(xPos, yPos, zPos); + BaseVolume::template Sampler< SimpleVolume >::setPosition(xPos, yPos, zPos); // Then we update the voxel pointer const int32_t uXBlock = this->mXPosInVolume >> this->mVolume->m_uBlockSideLengthPower; @@ -161,7 +161,7 @@ namespace PolyVox template bool SimpleVolume::Sampler::setVoxel(VoxelType tValue) { - if(m_bIsCurrentPositionValidInX && m_bIsCurrentPositionValidInY && m_bIsCurrentPositionValidInZ) + if(this->m_bIsCurrentPositionValidInX && this->m_bIsCurrentPositionValidInY && this->m_bIsCurrentPositionValidInZ) { *mCurrentVoxel = tValue; return true; @@ -176,7 +176,7 @@ namespace PolyVox void SimpleVolume::Sampler::movePositiveX(void) { // Base version updates position and validity flags. - BaseVolume::Sampler< SimpleVolume >::movePositiveX(); + BaseVolume::template Sampler< SimpleVolume >::movePositiveX(); // Then we update the voxel pointer if((this->mXPosInVolume) % this->mVolume->m_uBlockSideLength != 0) @@ -195,7 +195,7 @@ namespace PolyVox void SimpleVolume::Sampler::movePositiveY(void) { // Base version updates position and validity flags. - BaseVolume::Sampler< SimpleVolume >::movePositiveY(); + BaseVolume::template Sampler< SimpleVolume >::movePositiveY(); // Then we update the voxel pointer if((this->mYPosInVolume) % this->mVolume->m_uBlockSideLength != 0) @@ -214,7 +214,7 @@ namespace PolyVox void SimpleVolume::Sampler::movePositiveZ(void) { // Base version updates position and validity flags. - BaseVolume::Sampler< SimpleVolume >::movePositiveZ(); + BaseVolume::template Sampler< SimpleVolume >::movePositiveZ(); // Then we update the voxel pointer if((this->mZPosInVolume) % this->mVolume->m_uBlockSideLength != 0) @@ -233,7 +233,7 @@ namespace PolyVox void SimpleVolume::Sampler::moveNegativeX(void) { // Base version updates position and validity flags. - BaseVolume::Sampler< SimpleVolume >::moveNegativeX(); + BaseVolume::template Sampler< SimpleVolume >::moveNegativeX(); // Then we update the voxel pointer if((this->mXPosInVolume + 1) % this->mVolume->m_uBlockSideLength != 0) @@ -252,7 +252,7 @@ namespace PolyVox void SimpleVolume::Sampler::moveNegativeY(void) { // Base version updates position and validity flags. - BaseVolume::Sampler< SimpleVolume >::moveNegativeY(); + BaseVolume::template Sampler< SimpleVolume >::moveNegativeY(); // Then we update the voxel pointer if((this->mYPosInVolume + 1) % this->mVolume->m_uBlockSideLength != 0) @@ -271,7 +271,7 @@ namespace PolyVox void SimpleVolume::Sampler::moveNegativeZ(void) { // Base version updates position and validity flags. - BaseVolume::Sampler< SimpleVolume >::moveNegativeZ(); + BaseVolume::template Sampler< SimpleVolume >::moveNegativeZ(); // Then we update the voxel pointer if((this->mZPosInVolume + 1) % this->mVolume->m_uBlockSideLength != 0)