mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2025-01-09 00:00:18 +00:00
Merge pull request #132 from andrewkww/warning_fixes
Fix a few compiler warnings Thank you very much
This commit is contained in:
commit
20b41baff8
@ -77,7 +77,7 @@ readLine(unsigned char *line, int length, FILE *fp)
|
||||
if (c > 128) {
|
||||
// runlength
|
||||
c &= 127;
|
||||
int value = getc(fp);
|
||||
unsigned char value = (unsigned char)getc(fp);
|
||||
while (c--) {
|
||||
line[x*4+i] = value;
|
||||
x++;
|
||||
@ -85,7 +85,8 @@ readLine(unsigned char *line, int length, FILE *fp)
|
||||
} else {
|
||||
// non- runlength
|
||||
while (c--) {
|
||||
line[x*4+i] = getc(fp);
|
||||
unsigned char value = (unsigned char)getc(fp);
|
||||
line[x*4+i] = value;
|
||||
x++;
|
||||
}
|
||||
}
|
||||
|
@ -488,7 +488,7 @@ FarMeshFactory<T,U>::refineAdaptive( HbrMesh<T> * mesh, int maxIsolate ) {
|
||||
for (int k=0; k<nv; ++k)
|
||||
nextverts.insert( f->GetVertex(k) );
|
||||
}
|
||||
if (not (childedge = childvert->GetNextEdge(childedge)))
|
||||
if ((childedge = childvert->GetNextEdge(childedge)) == NULL)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -418,7 +418,7 @@ OsdPtexTextureLoader::OptimizePacking( int maxnumpages )
|
||||
}
|
||||
|
||||
// note: at least 2*GUTTER_WIDTH of margin required for each page to fit
|
||||
_pagesize += GetPageMargin();
|
||||
_pagesize += (unsigned short)GetPageMargin();
|
||||
|
||||
// grow the pagesize to make sure the optimization will not exceed the maximum
|
||||
// number of pages allowed
|
||||
@ -439,7 +439,7 @@ OsdPtexTextureLoader::OptimizePacking( int maxnumpages )
|
||||
// traverse existing pages for a suitable slot ---------------
|
||||
bool added=false;
|
||||
for( unsigned long int p=firstslot; p<_pages.size(); ++p )
|
||||
if( (added=_pages[p]->addBlock( b, GetGutterWidth() )) ) {
|
||||
if( (added=_pages[p]->addBlock( b, GetGutterWidth() )) == true ) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user