From 4667a4cd3704838754185bfb49d8f6dcf7acccce Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 15 Jul 2012 18:08:25 +0200 Subject: [PATCH] Fixed some compiler warnings. --- .../PolyVoxCore/include/PolyVoxCore/LargeVolume.inl | 12 ++++++------ .../include/PolyVoxCore/LargeVolumeSampler.inl | 6 +++--- .../PolyVoxCore/include/PolyVoxCore/SimpleVolume.inl | 6 +++--- .../include/PolyVoxCore/SimpleVolumeSampler.inl | 6 +++--- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.inl b/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.inl index 9b304686..cf47f573 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.inl @@ -111,9 +111,9 @@ namespace PolyVox const int32_t blockY = uYPos >> m_uBlockSideLengthPower; const int32_t blockZ = uZPos >> m_uBlockSideLengthPower; - const uint16_t xOffset = uXPos - (blockX << m_uBlockSideLengthPower); - const uint16_t yOffset = uYPos - (blockY << m_uBlockSideLengthPower); - const uint16_t zOffset = uZPos - (blockZ << m_uBlockSideLengthPower); + const uint16_t xOffset = static_cast(uXPos - (blockX << m_uBlockSideLengthPower)); + const uint16_t yOffset = static_cast(uYPos - (blockY << m_uBlockSideLengthPower)); + const uint16_t zOffset = static_cast(uZPos - (blockZ << m_uBlockSideLengthPower)); Block* pUncompressedBlock = getUncompressedBlock(blockX, blockY, blockZ); @@ -214,9 +214,9 @@ namespace PolyVox const int32_t blockY = uYPos >> m_uBlockSideLengthPower; const int32_t blockZ = uZPos >> m_uBlockSideLengthPower; - const uint16_t xOffset = uXPos - (blockX << m_uBlockSideLengthPower); - const uint16_t yOffset = uYPos - (blockY << m_uBlockSideLengthPower); - const uint16_t zOffset = uZPos - (blockZ << m_uBlockSideLengthPower); + const uint16_t xOffset = static_cast(uXPos - (blockX << m_uBlockSideLengthPower)); + const uint16_t yOffset = static_cast(uYPos - (blockY << m_uBlockSideLengthPower)); + const uint16_t zOffset = static_cast(uZPos - (blockZ << m_uBlockSideLengthPower)); Block* pUncompressedBlock = getUncompressedBlock(blockX, blockY, blockZ); diff --git a/library/PolyVoxCore/include/PolyVoxCore/LargeVolumeSampler.inl b/library/PolyVoxCore/include/PolyVoxCore/LargeVolumeSampler.inl index d827542b..e9530726 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/LargeVolumeSampler.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/LargeVolumeSampler.inl @@ -115,9 +115,9 @@ namespace PolyVox const int32_t uYBlock = this->mYPosInVolume >> this->mVolume->m_uBlockSideLengthPower; const int32_t uZBlock = this->mZPosInVolume >> this->mVolume->m_uBlockSideLengthPower; - const uint16_t uXPosInBlock = this->mXPosInVolume - (uXBlock << this->mVolume->m_uBlockSideLengthPower); - const uint16_t uYPosInBlock = this->mYPosInVolume - (uYBlock << this->mVolume->m_uBlockSideLengthPower); - const uint16_t uZPosInBlock = this->mZPosInVolume - (uZBlock << this->mVolume->m_uBlockSideLengthPower); + const uint16_t uXPosInBlock = static_cast(this->mXPosInVolume - (uXBlock << this->mVolume->m_uBlockSideLengthPower)); + const uint16_t uYPosInBlock = static_cast(this->mYPosInVolume - (uYBlock << this->mVolume->m_uBlockSideLengthPower)); + const uint16_t uZPosInBlock = static_cast(this->mZPosInVolume - (uZBlock << this->mVolume->m_uBlockSideLengthPower)); const uint32_t uVoxelIndexInBlock = uXPosInBlock + uYPosInBlock * this->mVolume->m_uBlockSideLength + diff --git a/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.inl b/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.inl index efaaec6e..7795e5bc 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.inl @@ -75,9 +75,9 @@ namespace PolyVox const int32_t blockY = uYPos >> m_uBlockSideLengthPower; const int32_t blockZ = uZPos >> m_uBlockSideLengthPower; - const uint16_t xOffset = uXPos - (blockX << m_uBlockSideLengthPower); - const uint16_t yOffset = uYPos - (blockY << m_uBlockSideLengthPower); - const uint16_t zOffset = uZPos - (blockZ << m_uBlockSideLengthPower); + const uint16_t xOffset = static_cast(uXPos - (blockX << m_uBlockSideLengthPower)); + const uint16_t yOffset = static_cast(uYPos - (blockY << m_uBlockSideLengthPower)); + const uint16_t zOffset = static_cast(uZPos - (blockZ << m_uBlockSideLengthPower)); typename SimpleVolume::Block* pUncompressedBlock = getUncompressedBlock(blockX, blockY, blockZ); diff --git a/library/PolyVoxCore/include/PolyVoxCore/SimpleVolumeSampler.inl b/library/PolyVoxCore/include/PolyVoxCore/SimpleVolumeSampler.inl index 987912d2..43f6a924 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/SimpleVolumeSampler.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/SimpleVolumeSampler.inl @@ -115,9 +115,9 @@ namespace PolyVox const int32_t uYBlock = this->mYPosInVolume >> this->mVolume->m_uBlockSideLengthPower; const int32_t uZBlock = this->mZPosInVolume >> this->mVolume->m_uBlockSideLengthPower; - const uint16_t uXPosInBlock = this->mXPosInVolume - (uXBlock << this->mVolume->m_uBlockSideLengthPower); - const uint16_t uYPosInBlock = this->mYPosInVolume - (uYBlock << this->mVolume->m_uBlockSideLengthPower); - const uint16_t uZPosInBlock = this->mZPosInVolume - (uZBlock << this->mVolume->m_uBlockSideLengthPower); + const uint16_t uXPosInBlock = static_cast(this->mXPosInVolume - (uXBlock << this->mVolume->m_uBlockSideLengthPower)); + const uint16_t uYPosInBlock = static_cast(this->mYPosInVolume - (uYBlock << this->mVolume->m_uBlockSideLengthPower)); + const uint16_t uZPosInBlock = static_cast(this->mZPosInVolume - (uZBlock << this->mVolume->m_uBlockSideLengthPower)); const uint32_t uVoxelIndexInBlock = uXPosInBlock + uYPosInBlock * this->mVolume->m_uBlockSideLength +