Warning fixes for GCC 4.6.
This commit is contained in:
parent
46ac159ec1
commit
834aa5d6c3
@ -8844,7 +8844,7 @@ GLboolean glxewGetExtension (const char* name)
|
||||
GLuint len = _glewStrLen((const GLubyte*)name);
|
||||
/* if (glXQueryExtensionsString == NULL || glXGetCurrentDisplay == NULL) return GL_FALSE; */
|
||||
/* p = (GLubyte*)glXQueryExtensionsString(glXGetCurrentDisplay(), DefaultScreen(glXGetCurrentDisplay())); */
|
||||
if (glXGetClientString == NULL || glXGetCurrentDisplay == NULL) return GL_FALSE;
|
||||
if (glXGetCurrentDisplay == NULL) return GL_FALSE;
|
||||
p = (GLubyte*)glXGetClientString(glXGetCurrentDisplay(), GLX_EXTENSIONS);
|
||||
if (0 == p) return GL_FALSE;
|
||||
end = p + _glewStrLen(p);
|
||||
|
@ -239,10 +239,6 @@ void OpenGLWidget::mouseMoveEvent(QMouseEvent* event)
|
||||
m_LastFrameMousePos = m_CurrentMousePos;;
|
||||
}
|
||||
|
||||
void OpenGLWidget::wheelEvent(QWheelEvent* event)
|
||||
{
|
||||
}
|
||||
|
||||
void OpenGLWidget::setupProjectionMatrix(void)
|
||||
{
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
|
@ -49,7 +49,6 @@ class OpenGLWidget : public QGLWidget
|
||||
|
||||
void mouseMoveEvent(QMouseEvent* event);
|
||||
void mousePressEvent(QMouseEvent* event);
|
||||
void wheelEvent ( QWheelEvent * event );
|
||||
|
||||
protected:
|
||||
void initializeGL();
|
||||
|
@ -8844,7 +8844,7 @@ GLboolean glxewGetExtension (const char* name)
|
||||
GLuint len = _glewStrLen((const GLubyte*)name);
|
||||
/* if (glXQueryExtensionsString == NULL || glXGetCurrentDisplay == NULL) return GL_FALSE; */
|
||||
/* p = (GLubyte*)glXQueryExtensionsString(glXGetCurrentDisplay(), DefaultScreen(glXGetCurrentDisplay())); */
|
||||
if (glXGetClientString == NULL || glXGetCurrentDisplay == NULL) return GL_FALSE;
|
||||
if (glXGetCurrentDisplay == NULL) return GL_FALSE;
|
||||
p = (GLubyte*)glXGetClientString(glXGetCurrentDisplay(), GLX_EXTENSIONS);
|
||||
if (0 == p) return GL_FALSE;
|
||||
end = p + _glewStrLen(p);
|
||||
|
@ -211,7 +211,6 @@ void Perlin::init(void)
|
||||
float Perlin::perlin_noise_2D(float vec[2])
|
||||
{
|
||||
int terms = mOctaves;
|
||||
float freq = mFrequency;
|
||||
float result = 0.0f;
|
||||
float amp = mAmplitude;
|
||||
|
||||
@ -233,7 +232,6 @@ float Perlin::perlin_noise_2D(float vec[2])
|
||||
float Perlin::perlin_noise_3D(float vec[3])
|
||||
{
|
||||
int terms = mOctaves;
|
||||
float freq = mFrequency;
|
||||
float result = 0.0f;
|
||||
float amp = mAmplitude;
|
||||
|
||||
|
@ -8844,7 +8844,7 @@ GLboolean glxewGetExtension (const char* name)
|
||||
GLuint len = _glewStrLen((const GLubyte*)name);
|
||||
/* if (glXQueryExtensionsString == NULL || glXGetCurrentDisplay == NULL) return GL_FALSE; */
|
||||
/* p = (GLubyte*)glXQueryExtensionsString(glXGetCurrentDisplay(), DefaultScreen(glXGetCurrentDisplay())); */
|
||||
if (glXGetClientString == NULL || glXGetCurrentDisplay == NULL) return GL_FALSE;
|
||||
if (glXGetCurrentDisplay == NULL) return GL_FALSE;
|
||||
p = (GLubyte*)glXGetClientString(glXGetCurrentDisplay(), GLX_EXTENSIONS);
|
||||
if (0 == p) return GL_FALSE;
|
||||
end = p + _glewStrLen(p);
|
||||
|
@ -238,7 +238,8 @@ void load(const ConstVolumeProxy<MaterialDensityPair44>& volume, const PolyVox::
|
||||
}
|
||||
}
|
||||
}
|
||||
void unload(const ConstVolumeProxy<MaterialDensityPair44>& vol, const PolyVox::Region& reg)
|
||||
|
||||
void unload(const ConstVolumeProxy<MaterialDensityPair44>& /*vol*/, const PolyVox::Region& reg)
|
||||
{
|
||||
std::cout << "warning unloading region: " << reg.getLowerCorner() << " -> " << reg.getUpperCorner() << std::endl;
|
||||
}
|
||||
|
@ -8844,7 +8844,7 @@ GLboolean glxewGetExtension (const char* name)
|
||||
GLuint len = _glewStrLen((const GLubyte*)name);
|
||||
/* if (glXQueryExtensionsString == NULL || glXGetCurrentDisplay == NULL) return GL_FALSE; */
|
||||
/* p = (GLubyte*)glXQueryExtensionsString(glXGetCurrentDisplay(), DefaultScreen(glXGetCurrentDisplay())); */
|
||||
if (glXGetClientString == NULL || glXGetCurrentDisplay == NULL) return GL_FALSE;
|
||||
if (glXGetCurrentDisplay == NULL) return GL_FALSE;
|
||||
p = (GLubyte*)glXGetClientString(glXGetCurrentDisplay(), GLX_EXTENSIONS);
|
||||
if (0 == p) return GL_FALSE;
|
||||
end = p + _glewStrLen(p);
|
||||
|
@ -76,11 +76,11 @@ namespace PolyVox
|
||||
:volume(volData)
|
||||
,start(v3dStart)
|
||||
,end(v3dEnd)
|
||||
,result(listResult)
|
||||
,hBias(fHBias)
|
||||
,connectivity(connectivity)
|
||||
,isVoxelValidForPath(funcIsVoxelValidForPath)
|
||||
,hBias(fHBias)
|
||||
,result(listResult)
|
||||
,maxNumberOfNodes(uMaxNoOfNodes)
|
||||
,isVoxelValidForPath(funcIsVoxelValidForPath)
|
||||
,progressCallback(funcProgressCallback)
|
||||
{
|
||||
}
|
||||
|
@ -69,18 +69,15 @@ namespace PolyVox
|
||||
const int iRatioX = m_volInput->getWidth() / m_arrayResult->getDimension(0);
|
||||
const int iRatioY = m_volInput->getHeight() / m_arrayResult->getDimension(1);
|
||||
const int iRatioZ = m_volInput->getDepth() / m_arrayResult->getDimension(2);
|
||||
const int iRatioMax = (std::max)((std::max)(iRatioX, iRatioY), iRatioZ);
|
||||
|
||||
const float fRatioX = iRatioX;
|
||||
const float fRatioY = iRatioY;
|
||||
const float fRatioZ = iRatioZ;
|
||||
const float fRatioMax = iRatioMax;
|
||||
const Vector3DFloat v3dRatio(fRatioX, fRatioY, fRatioZ);
|
||||
|
||||
const float fHalfRatioX = fRatioX * 0.5f;
|
||||
const float fHalfRatioY = fRatioY * 0.5f;
|
||||
const float fHalfRatioZ = fRatioZ * 0.5f;
|
||||
const float fHalfRatioMax = fRatioMax * 0.5f;
|
||||
const Vector3DFloat v3dHalfRatio(fHalfRatioX, fHalfRatioY, fHalfRatioZ);
|
||||
|
||||
const Vector3DFloat v3dOffset(0.5f,0.5f,0.5f);
|
||||
|
@ -33,8 +33,8 @@ namespace PolyVox
|
||||
CubicSurfaceExtractorWithNormals<VolumeType, VoxelType>::CubicSurfaceExtractorWithNormals(VolumeType<VoxelType>* volData, Region region, SurfaceMesh<PositionMaterialNormal>* result)
|
||||
:m_volData(volData)
|
||||
,m_sampVolume(volData)
|
||||
,m_regSizeInVoxels(region)
|
||||
,m_meshCurrent(result)
|
||||
,m_regSizeInVoxels(region)
|
||||
{
|
||||
m_meshCurrent->clear();
|
||||
}
|
||||
|
@ -391,7 +391,7 @@ namespace PolyVox
|
||||
}
|
||||
// load a block
|
||||
numblocks--;
|
||||
Block<VoxelType>* block = getUncompressedBlock(x,y,z);
|
||||
getUncompressedBlock(x,y,z);
|
||||
} // for z
|
||||
} // for y
|
||||
} // for x
|
||||
|
@ -119,7 +119,7 @@ namespace PolyVox
|
||||
}
|
||||
|
||||
template <typename VertexType>
|
||||
uint32_t MeshDecimator<VertexType>::performDecimationPass(float m_fMinDotProductForCollapse)
|
||||
uint32_t MeshDecimator<VertexType>::performDecimationPass(float /*m_fMinDotProductForCollapse*/)
|
||||
{
|
||||
// Count how many edges we have collapsed
|
||||
uint32_t noOfEdgesCollapsed = 0;
|
||||
@ -250,7 +250,7 @@ namespace PolyVox
|
||||
}
|
||||
|
||||
template <typename VertexType>
|
||||
bool MeshDecimator<VertexType>::canCollapseMaterialEdge(uint32_t uSrc, uint32_t uDst)
|
||||
bool MeshDecimator<VertexType>::canCollapseMaterialEdge(uint32_t /*uSrc*/, uint32_t /*uDst*/)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -32,11 +32,11 @@ namespace PolyVox
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
template< template<typename> class VolumeType, typename VoxelType>
|
||||
Raycast<VolumeType, VoxelType>::Raycast(VolumeType<VoxelType>* volData, const Vector3DFloat& v3dStart, const Vector3DFloat& v3dDirection, RaycastResult& result)
|
||||
:m_volData(volData)
|
||||
:m_result(result)
|
||||
,m_volData(volData)
|
||||
,m_sampVolume(volData)
|
||||
,m_v3dStart(v3dStart)
|
||||
,m_v3dDirection(v3dDirection)
|
||||
,m_result(result)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -33,9 +33,9 @@ namespace PolyVox
|
||||
{
|
||||
template <typename VoxelType>
|
||||
SimpleVolume<VoxelType>::Block::Block(uint16_t uSideLength)
|
||||
:m_uSideLength(0)
|
||||
:m_tUncompressedData(0)
|
||||
,m_uSideLength(0)
|
||||
,m_uSideLengthPower(0)
|
||||
,m_tUncompressedData(0)
|
||||
{
|
||||
if(uSideLength != 0)
|
||||
{
|
||||
|
@ -168,8 +168,7 @@ namespace PolyVox
|
||||
const Array2DInt32& m_pPreviousVertexIndicesY,
|
||||
const Array2DInt32& m_pPreviousVertexIndicesZ,
|
||||
const Array2DInt32& m_pCurrentVertexIndicesX,
|
||||
const Array2DInt32& m_pCurrentVertexIndicesY,
|
||||
const Array2DInt32& m_pCurrentVertexIndicesZ);
|
||||
const Array2DInt32& m_pCurrentVertexIndicesY);
|
||||
|
||||
//The volume data and a sampler to access it.
|
||||
VolumeType<VoxelType>* m_volData;
|
||||
|
@ -108,7 +108,7 @@ namespace PolyVox
|
||||
|
||||
if((uNoOfNonEmptyCellsForSlice0 != 0) || (uNoOfNonEmptyCellsForSlice1 != 0))
|
||||
{
|
||||
generateIndicesForSlice(pPreviousBitmask, m_pPreviousVertexIndicesX, m_pPreviousVertexIndicesY, m_pPreviousVertexIndicesZ, m_pCurrentVertexIndicesX, m_pCurrentVertexIndicesY, m_pCurrentVertexIndicesZ);
|
||||
generateIndicesForSlice(pPreviousBitmask, m_pPreviousVertexIndicesX, m_pPreviousVertexIndicesY, m_pPreviousVertexIndicesZ, m_pCurrentVertexIndicesX, m_pCurrentVertexIndicesY);
|
||||
}
|
||||
|
||||
std::swap(uNoOfNonEmptyCellsForSlice0, uNoOfNonEmptyCellsForSlice1);
|
||||
@ -512,8 +512,7 @@ namespace PolyVox
|
||||
const Array2DInt32& m_pPreviousVertexIndicesY,
|
||||
const Array2DInt32& m_pPreviousVertexIndicesZ,
|
||||
const Array2DInt32& m_pCurrentVertexIndicesX,
|
||||
const Array2DInt32& m_pCurrentVertexIndicesY,
|
||||
const Array2DInt32& m_pCurrentVertexIndicesZ)
|
||||
const Array2DInt32& m_pCurrentVertexIndicesY)
|
||||
{
|
||||
int32_t indlist[12];
|
||||
for(int i = 0; i < 12; i++)
|
||||
|
@ -165,7 +165,7 @@ namespace PolyVox
|
||||
template <uint32_t Size, typename Type>
|
||||
inline bool Vector<Size, Type>::operator<(const Vector<Size, Type> &rhs) const throw()
|
||||
{
|
||||
for(int ct = 0; ct < Size; ++ct)
|
||||
for(uint32_t ct = 0; ct < Size; ++ct)
|
||||
{
|
||||
if (m_tElements[ct] < rhs.m_tElements[ct])
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user