mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-12-24 00:40:33 +00:00
Fix some warnings that are failing VC++ builds
This commit is contained in:
parent
9e9fd5c021
commit
c8d490e292
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user