Fixed all warnings with -Wall and -Wextra
This commit is contained in:
parent
6cad1e7748
commit
3c0f2ab4b2
@ -58,10 +58,6 @@ namespace PolyVox
|
|||||||
memset(m_previousSliceVertices.getRawData(), 0xff, m_previousSliceVertices.getNoOfElements() * sizeof(IndexAndMaterial));
|
memset(m_previousSliceVertices.getRawData(), 0xff, m_previousSliceVertices.getNoOfElements() * sizeof(IndexAndMaterial));
|
||||||
memset(m_currentSliceVertices.getRawData(), 0xff, m_currentSliceVertices.getNoOfElements() * sizeof(IndexAndMaterial));
|
memset(m_currentSliceVertices.getRawData(), 0xff, m_currentSliceVertices.getNoOfElements() * sizeof(IndexAndMaterial));
|
||||||
|
|
||||||
uint32_t uRegionWidth = m_regSizeInVoxels.getUpperCorner().getX() - m_regSizeInVoxels.getLowerCorner().getX() + 1;
|
|
||||||
uint32_t uRegionHeight = m_regSizeInVoxels.getUpperCorner().getY() - m_regSizeInVoxels.getLowerCorner().getY() + 1;
|
|
||||||
uint32_t uRegionDepth = m_regSizeInVoxels.getUpperCorner().getZ() - m_regSizeInVoxels.getLowerCorner().getZ() + 1;
|
|
||||||
|
|
||||||
m_vecQuads[NegativeX].resize(m_regSizeInVoxels.getUpperCorner().getX() - m_regSizeInVoxels.getLowerCorner().getX() + 2);
|
m_vecQuads[NegativeX].resize(m_regSizeInVoxels.getUpperCorner().getX() - m_regSizeInVoxels.getLowerCorner().getX() + 2);
|
||||||
m_vecQuads[PositiveX].resize(m_regSizeInVoxels.getUpperCorner().getX() - m_regSizeInVoxels.getLowerCorner().getX() + 2);
|
m_vecQuads[PositiveX].resize(m_regSizeInVoxels.getUpperCorner().getX() - m_regSizeInVoxels.getLowerCorner().getX() + 2);
|
||||||
|
|
||||||
@ -217,7 +213,7 @@ namespace PolyVox
|
|||||||
}
|
}
|
||||||
|
|
||||||
//If we have an existing vertex and the material matches then we can return it.
|
//If we have an existing vertex and the material matches then we can return it.
|
||||||
if(rEntry.uMaterial == uMaterialIn)
|
if(rEntry.uMaterial == static_cast<int32_t>(uMaterialIn))
|
||||||
{
|
{
|
||||||
return rEntry.iIndex;
|
return rEntry.iIndex;
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ namespace PolyVox
|
|||||||
/// The default implementation of this function just returns the constant '1'. There's not much else it can do, as it needs to work with primitive
|
/// The default implementation of this function just returns the constant '1'. There's not much else it can do, as it needs to work with primitive
|
||||||
/// types and the actual value of the type is already being considered to be the density. Specialisations of this class can modify this behaviour.
|
/// types and the actual value of the type is already being considered to be the density. Specialisations of this class can modify this behaviour.
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
MaterialType convertToMaterial(VoxelType voxel)
|
MaterialType convertToMaterial(VoxelType /*voxel*/)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -159,7 +159,7 @@ namespace PolyVox
|
|||||||
return voxel.getDensity();
|
return voxel.getDensity();
|
||||||
}
|
}
|
||||||
|
|
||||||
MaterialType convertToMaterial(Density<Type> voxel)
|
MaterialType convertToMaterial(Density<Type> /*voxel*/)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,6 @@ void TestCubicSurfaceExtractor::testExecute()
|
|||||||
const static uint32_t uExpectedIndices = 9936;
|
const static uint32_t uExpectedIndices = 9936;
|
||||||
const static uint32_t uMaterialToCheck = 3000;
|
const static uint32_t uMaterialToCheck = 3000;
|
||||||
const static float fExpectedMaterial = 42.0f;
|
const static float fExpectedMaterial = 42.0f;
|
||||||
const static float fNoMaterial = 1.0f;
|
|
||||||
const static uint32_t uIndexToCheck = 2000;
|
const static uint32_t uIndexToCheck = 2000;
|
||||||
const static uint32_t uExpectedIndex = 1334;
|
const static uint32_t uExpectedIndex = 1334;
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ public:
|
|||||||
return voxel;
|
return voxel;
|
||||||
}
|
}
|
||||||
|
|
||||||
float convertToMaterial(float voxel)
|
float convertToMaterial(float /*voxel*/)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -83,7 +83,7 @@ void writeDensityValueToVoxel(int valueToWrite, MaterialDensityPair88& voxel)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename VoxelType>
|
template<typename VoxelType>
|
||||||
void writeMaterialValueToVoxel(int valueToWrite, VoxelType& voxel)
|
void writeMaterialValueToVoxel(int /*valueToWrite*/, VoxelType& /*voxel*/)
|
||||||
{
|
{
|
||||||
//Most types don't have a material
|
//Most types don't have a material
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user