Fixed unsigned vs signed int comparisons

This commit is contained in:
Cirilo Bernardo 2016-03-11 09:37:39 +11:00
parent ec580cff50
commit 0085d1aea7
6 changed files with 7 additions and 9 deletions

View File

@ -535,7 +535,7 @@ S3DMODEL* S3D::GetModel( SCENEGRAPH* aNode )
size_t j = materials.matorder.size();
SMATERIAL* lmat = new SMATERIAL[j];
for( int i = 0; i < j; ++i )
for( size_t i = 0; i < j; ++i )
formatMaterial( lmat[i], materials.matorder[i] );
model->m_Materials = lmat;
@ -545,7 +545,7 @@ S3DMODEL* S3D::GetModel( SCENEGRAPH* aNode )
j = meshes.size();
SMESH* lmesh = new SMESH[j];
for( int i = 0; i < j; ++i )
for( size_t i = 0; i < j; ++i )
lmesh[i] = meshes[i];
model->m_Meshes = lmesh;

View File

@ -1032,7 +1032,7 @@ bool SGFACESET::validate( void )
// check that vertex[n] >= 0 and < nVertices
for( size_t i = 0; i < nCIdx; ++i )
{
if( lCIdx[i] < 0 || lCIdx[i] >= nCoords )
if( lCIdx[i] < 0 || lCIdx[i] >= (int)nCoords )
{
#ifdef DEBUG
std::ostringstream ostr;

View File

@ -435,8 +435,8 @@ bool S3D::CalcTriangleNormals( std::vector< SGPOINT > coords,
p2 = index[i++];
p3 = index[i++];
if( p1 < 0 || p1 >= vsize || p2 < 0 || p2 >= vsize ||
p3 < 0 || p3 >= vsize )
if( p1 < 0 || p1 >= (int)vsize || p2 < 0 || p2 >= (int)vsize ||
p3 < 0 || p3 >= (int)vsize )
{
#ifdef DEBUG
std::ostringstream ostr;

View File

@ -105,7 +105,6 @@ class SGCOORDINDEX;
#define ADD_NODE( aNodeID, aType, aNode, aOwnedList, aRefList, isChild ) do { \
if( aNodeID == aNode->GetNodeType() ) { \
std::vector< aType* >::iterator sL; \
SGNODE* psg = NULL; \
sL = std::find( aOwnedList.begin(), aOwnedList.end(), aNode ); \
if( sL != aOwnedList.end() ) return true; \
sL = std::find( aRefList.begin(), aRefList.end(), aNode ); \

View File

@ -177,7 +177,7 @@ void SGNORMALS::SetNormalList( size_t aListSize, const SGVECTOR* aNormalList )
if( 0 == aListSize || NULL == aNormalList )
return;
for( int i = 0; i < aListSize; ++i )
for( int i = 0; i < (int)aListSize; ++i )
norms.push_back( aNormalList[i] );
return;

View File

@ -817,8 +817,7 @@ bool SGSHAPE::Prepare( const glm::dmat4* aTransform,
// construct the final vertex/color list
SFVEC3F* lColors = NULL;
SFVEC3F* lCoords = new SFVEC3F[ vertices.size() ];
double red, green, blue;
int ti, ii;
int ti;
if( pc )
{