fix a few more warnings under Windows

fix linker issue due to unsigned/int variable
This commit is contained in:
erwin.coumans
2012-09-10 04:46:39 +00:00
parent 5417bae113
commit 77b662d5fe
4 changed files with 8 additions and 8 deletions

View File

@@ -148,7 +148,7 @@ public:\
static DemoApplication* Create()\ static DemoApplication* Create()\
{\ {\
SoftDemo* demo = new SoftDemo##a;\ SoftDemo* demo = new SoftDemo##a;\
extern unsigned int current_demo;\ extern int current_demo;\
current_demo=a;\ current_demo=a;\
demo->myinit();\ demo->myinit();\
demo->initPhysics();\ demo->initPhysics();\

View File

@@ -93,7 +93,7 @@ void SampleThreadFunc(void* userPtr,void* lsMemory)
} }
//do some fake work //do some fake work
for (int i=0;i<1000000;i++) for (int i=0;i<1000000;i++)
args->m_fakeWork = 1.21*args->m_fakeWork; args->m_fakeWork = btScalar(1.21)*args->m_fakeWork;
workLeft = count>0; workLeft = count>0;
} }
printf("finished\n"); printf("finished\n");

View File

@@ -514,7 +514,7 @@ void btSoftBody::addAeroForceToNode(const btVector3& windVelocity,int nodeInde
{ {
btScalar del_v_by_fDrag_len = del_v_by_fDrag.length(); btScalar del_v_by_fDrag_len = del_v_by_fDrag.length();
btScalar v_len = n.m_v.length(); btScalar v_len = n.m_v.length();
fDrag *= 0.8*(v_len / del_v_by_fDrag_len); fDrag *= btScalar(0.8)*(v_len / del_v_by_fDrag_len);
} }
n.m_f += fDrag; n.m_f += fDrag;
@@ -607,7 +607,7 @@ void btSoftBody::addAeroForceToFace(const btVector3& windVelocity,int faceInde
{ {
btScalar del_v_by_fDrag_len = del_v_by_fDrag.length(); btScalar del_v_by_fDrag_len = del_v_by_fDrag.length();
btScalar v_len = f.m_n[j]->m_v.length(); btScalar v_len = f.m_n[j]->m_v.length();
fDrag *= 0.8*(v_len / del_v_by_fDrag_len); fDrag *= btScalar(0.8)*(v_len / del_v_by_fDrag_len);
} }
f.m_n[j]->m_f += fDrag; f.m_n[j]->m_f += fDrag;
@@ -857,8 +857,8 @@ void btSoftBody::setRestLengthScale(btScalar restLengthScale)
} }
m_restLengthScale = restLengthScale; m_restLengthScale = restLengthScale;
if (getActivationState() == ISLAND_SLEEPING); if (getActivationState() == ISLAND_SLEEPING)
activate(); activate();
} }
// //

View File

@@ -315,7 +315,7 @@ long _maxdot_large( const float *vv, const float *vec, unsigned long count, floa
index += localCount/4; index += localCount/4;
#else #else
{ {
for( int i=0; i<localCount/4; i++,index++) for( unsigned int i=0; i<localCount/4; i++,index++)
{ // do four dot products at a time. Carefully avoid touching the w element. { // do four dot products at a time. Carefully avoid touching the w element.
float4 v0 = vertices[0]; float4 v0 = vertices[0];
float4 v1 = vertices[1]; float4 v1 = vertices[1];
@@ -702,7 +702,7 @@ long _mindot_large( const float *vv, const float *vec, unsigned long count, floa
index += localCount/4; index += localCount/4;
#else #else
{ {
for( int i=0; i<localCount/4; i++,index++) for( unsigned int i=0; i<localCount/4; i++,index++)
{ // do four dot products at a time. Carefully avoid touching the w element. { // do four dot products at a time. Carefully avoid touching the w element.
float4 v0 = vertices[0]; float4 v0 = vertices[0];
float4 v1 = vertices[1]; float4 v1 = vertices[1];