Fix some warnings that are failing VC++ builds

This commit is contained in:
manuelk 2013-10-28 15:48:51 -07:00
parent 9e9fd5c021
commit c8d490e292
2 changed files with 8 additions and 3 deletions

View File

@ -432,12 +432,14 @@ createMesh( const std::string &shape, Scheme scheme=kCatmark ) {
srand( static_cast<int>(2147483647) ); // use a large Pell prime number
// Generate set of random (u,v) locations for the face
float * u = new float[g_nsamples],
* v = new float[g_nsamples];
for (int i=0; i<nfaces; ++i) {
HFace * f = mesh->GetFace(i);
// Generate set of random (u,v) locations for the face
float u[g_nsamples], v[g_nsamples];
for (int j=0; j<g_nsamples; ++j) {
u[j] = (float)rand()/(float)RAND_MAX;
v[j] = (float)rand()/(float)RAND_MAX;
@ -463,6 +465,9 @@ createMesh( const std::string &shape, Scheme scheme=kCatmark ) {
}
}
delete [] u;
delete [] v;
// Create control vertex buffer (layout: [ P(xyz) ] )
delete g_controlValues;
g_controlValues = OsdCpuVertexBuffer::Create(3, nverts);

View File

@ -37,7 +37,7 @@ namespace OPENSUBDIV_VERSION {
OsdTbbComputeController::OsdTbbComputeController(int numThreads) {
_numThreads = numThreads;
if(_numThreads == -1)
tbb::task_scheduler_init init();
tbb::task_scheduler_init init;
else
tbb::task_scheduler_init init(numThreads);
}