Fixed unsigned vs signed int comparisons
This commit is contained in:
parent
ec580cff50
commit
0085d1aea7
|
@ -535,7 +535,7 @@ S3DMODEL* S3D::GetModel( SCENEGRAPH* aNode )
|
||||||
size_t j = materials.matorder.size();
|
size_t j = materials.matorder.size();
|
||||||
SMATERIAL* lmat = new SMATERIAL[j];
|
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] );
|
formatMaterial( lmat[i], materials.matorder[i] );
|
||||||
|
|
||||||
model->m_Materials = lmat;
|
model->m_Materials = lmat;
|
||||||
|
@ -545,7 +545,7 @@ S3DMODEL* S3D::GetModel( SCENEGRAPH* aNode )
|
||||||
j = meshes.size();
|
j = meshes.size();
|
||||||
SMESH* lmesh = new SMESH[j];
|
SMESH* lmesh = new SMESH[j];
|
||||||
|
|
||||||
for( int i = 0; i < j; ++i )
|
for( size_t i = 0; i < j; ++i )
|
||||||
lmesh[i] = meshes[i];
|
lmesh[i] = meshes[i];
|
||||||
|
|
||||||
model->m_Meshes = lmesh;
|
model->m_Meshes = lmesh;
|
||||||
|
|
|
@ -1032,7 +1032,7 @@ bool SGFACESET::validate( void )
|
||||||
// check that vertex[n] >= 0 and < nVertices
|
// check that vertex[n] >= 0 and < nVertices
|
||||||
for( size_t i = 0; i < nCIdx; ++i )
|
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
|
#ifdef DEBUG
|
||||||
std::ostringstream ostr;
|
std::ostringstream ostr;
|
||||||
|
|
|
@ -435,8 +435,8 @@ bool S3D::CalcTriangleNormals( std::vector< SGPOINT > coords,
|
||||||
p2 = index[i++];
|
p2 = index[i++];
|
||||||
p3 = index[i++];
|
p3 = index[i++];
|
||||||
|
|
||||||
if( p1 < 0 || p1 >= vsize || p2 < 0 || p2 >= vsize ||
|
if( p1 < 0 || p1 >= (int)vsize || p2 < 0 || p2 >= (int)vsize ||
|
||||||
p3 < 0 || p3 >= vsize )
|
p3 < 0 || p3 >= (int)vsize )
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
std::ostringstream ostr;
|
std::ostringstream ostr;
|
||||||
|
|
|
@ -105,7 +105,6 @@ class SGCOORDINDEX;
|
||||||
#define ADD_NODE( aNodeID, aType, aNode, aOwnedList, aRefList, isChild ) do { \
|
#define ADD_NODE( aNodeID, aType, aNode, aOwnedList, aRefList, isChild ) do { \
|
||||||
if( aNodeID == aNode->GetNodeType() ) { \
|
if( aNodeID == aNode->GetNodeType() ) { \
|
||||||
std::vector< aType* >::iterator sL; \
|
std::vector< aType* >::iterator sL; \
|
||||||
SGNODE* psg = NULL; \
|
|
||||||
sL = std::find( aOwnedList.begin(), aOwnedList.end(), aNode ); \
|
sL = std::find( aOwnedList.begin(), aOwnedList.end(), aNode ); \
|
||||||
if( sL != aOwnedList.end() ) return true; \
|
if( sL != aOwnedList.end() ) return true; \
|
||||||
sL = std::find( aRefList.begin(), aRefList.end(), aNode ); \
|
sL = std::find( aRefList.begin(), aRefList.end(), aNode ); \
|
||||||
|
|
|
@ -177,7 +177,7 @@ void SGNORMALS::SetNormalList( size_t aListSize, const SGVECTOR* aNormalList )
|
||||||
if( 0 == aListSize || NULL == aNormalList )
|
if( 0 == aListSize || NULL == aNormalList )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for( int i = 0; i < aListSize; ++i )
|
for( int i = 0; i < (int)aListSize; ++i )
|
||||||
norms.push_back( aNormalList[i] );
|
norms.push_back( aNormalList[i] );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -817,8 +817,7 @@ bool SGSHAPE::Prepare( const glm::dmat4* aTransform,
|
||||||
// construct the final vertex/color list
|
// construct the final vertex/color list
|
||||||
SFVEC3F* lColors = NULL;
|
SFVEC3F* lColors = NULL;
|
||||||
SFVEC3F* lCoords = new SFVEC3F[ vertices.size() ];
|
SFVEC3F* lCoords = new SFVEC3F[ vertices.size() ];
|
||||||
double red, green, blue;
|
int ti;
|
||||||
int ti, ii;
|
|
||||||
|
|
||||||
if( pc )
|
if( pc )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue