Browse Source

build: fix shitloads of warnings.

legacy
Sam Hocevar sam 12 years ago
parent
commit
3bfbb6c408
8 changed files with 42 additions and 15 deletions
  1. +24
    -10
      src/bullet/LinearMath/btConvexHull.cpp
  2. +5
    -3
      src/bullet/LinearMath/btConvexHull.h
  3. +3
    -1
      src/bullet/LinearMath/btQuickprof.cpp
  4. +2
    -0
      src/easymesh/easymesh-scanner.l
  5. +2
    -1
      src/eglapp.cpp
  6. +2
    -0
      src/generated/easymesh-scanner.cpp
  7. +2
    -0
      src/platform/sdl/sdlinput.cpp
  8. +2
    -0
      src/tileset.cpp

+ 24
- 10
src/bullet/LinearMath/btConvexHull.cpp View File

@@ -275,9 +275,11 @@ int maxdirsterid(const T *p,int count,const T &dir,btAlignedObjectArray<int> &al
int mc = ma;
for(btScalar xx = x-btScalar(40.0) ; xx <= x ; xx+= btScalar(5.0))
{
btScalar s = btSin(SIMD_RADS_PER_DEG*(xx));
btScalar c = btCos(SIMD_RADS_PER_DEG*(xx));
int md = maxdirfiltered(p,count,dir+(u*s+v*c)*btScalar(0.025),allow);
// LOL BEGIN
btScalar ss = btSin(SIMD_RADS_PER_DEG*(xx));
btScalar cc = btCos(SIMD_RADS_PER_DEG*(xx));
int md = maxdirfiltered(p,count,dir+(u*ss+v*cc)*btScalar(0.025),allow);
// LOL END
if(mc==m && md==m)
{
allow[m]=3;
@@ -309,8 +311,10 @@ int operator ==(const int3 &a,const int3 &b)
}


int above(btVector3* vertices,const int3& t, const btVector3 &p, btScalar epsilon);
int above(btVector3* vertices,const int3& t, const btVector3 &p, btScalar epsilon)
// LOL BEGIN
int above(btVector3 const* vertices,const int3& t, const btVector3 &p, btScalar epsilon);
int above(btVector3 const* vertices,const int3& t, const btVector3 &p, btScalar epsilon)
// LOL END
{
btVector3 n=TriNormal(vertices[t[0]],vertices[t[1]],vertices[t[2]]);
return (btDot(n,p-vertices[t[0]]) > epsilon); // EPSILON???
@@ -486,7 +490,9 @@ btHullTriangle* HullLibrary::extrudable(btScalar epsilon)



int4 HullLibrary::FindSimplex(btVector3 *verts,int verts_count,btAlignedObjectArray<int> &allow)
// LOL BEGIN
int4 HullLibrary::FindSimplex(btVector3 const *verts,int verts_count,btAlignedObjectArray<int> &allow)
// LOL END
{
btVector3 basis[3];
basis[0] = btVector3( btScalar(0.01), btScalar(0.02), btScalar(1.0) );
@@ -522,7 +528,9 @@ int4 HullLibrary::FindSimplex(btVector3 *verts,int verts_count,btAlignedObjectAr
return int4(p0,p1,p2,p3);
}

int HullLibrary::calchullgen(btVector3 *verts,int verts_count, int vlimit)
// LOL BEGIN
int HullLibrary::calchullgen(btVector3 const *verts,int verts_count, int vlimit)
// LOL END
{
if(verts_count <4) return 0;
if(vlimit==0) vlimit=1000000000;
@@ -570,7 +578,9 @@ int HullLibrary::calchullgen(btVector3 *verts,int verts_count, int vlimit)
vlimit-=4;
while(vlimit >0 && ((te=extrudable(epsilon)) != 0))
{
int3 ti=*te;
// LOL BEGIN
//int3 ti=*te;
// LOL END
int v=te->vmax;
btAssert(v != -1);
btAssert(!isextreme[v]); // wtf we've already done this vertex
@@ -622,7 +632,9 @@ int HullLibrary::calchullgen(btVector3 *verts,int verts_count, int vlimit)
return 1;
}

int HullLibrary::calchull(btVector3 *verts,int verts_count, TUIntArray& tris_out, int &tris_count,int vlimit)
// LOL BEGIN
int HullLibrary::calchull(btVector3 const *verts,int verts_count, TUIntArray& tris_out, int &tris_count,int vlimit)
// LOL END
{
int rc=calchullgen(verts,verts_count, vlimit) ;
if(!rc) return 0;
@@ -658,7 +670,9 @@ bool HullLibrary::ComputeHull(unsigned int vcount,const btVector3 *vertices,PHul
{
int tris_count;
int ret = calchull( (btVector3 *) vertices, (int) vcount, result.m_Indices, tris_count, static_cast<int>(vlimit) );
// LOL BEGIN
int ret = calchull( vertices, (int) vcount, result.m_Indices, tris_count, static_cast<int>(vlimit) );
// LOL END
if(!ret) return false;
result.mIndexCount = (unsigned int) (tris_count*3);
result.mFaceCount = (unsigned int) tris_count;


+ 5
- 3
src/bullet/LinearMath/btConvexHull.h View File

@@ -209,11 +209,13 @@ private:

btHullTriangle* extrudable(btScalar epsilon);

int calchull(btVector3 *verts,int verts_count, TUIntArray& tris_out, int &tris_count,int vlimit);
// LOL BEGIN
int calchull(btVector3 const *verts,int verts_count, TUIntArray& tris_out, int &tris_count,int vlimit);

int calchullgen(btVector3 *verts,int verts_count, int vlimit);
int calchullgen(btVector3 const *verts,int verts_count, int vlimit);

int4 FindSimplex(btVector3 *verts,int verts_count,btAlignedObjectArray<int> &allow);
int4 FindSimplex(btVector3 const *verts,int verts_count,btAlignedObjectArray<int> &allow);
// LOL END

class ConvexH* ConvexHCrop(ConvexH& convex,const btPlane& slice);



+ 3
- 1
src/bullet/LinearMath/btQuickprof.cpp View File

@@ -526,7 +526,9 @@ void CProfileManager::dumpRecursive(CProfileIterator* profileIterator, int spaci
accumulated_time += current_total_time;
float fraction = parent_time > SIMD_EPSILON ? (current_total_time / parent_time) * 100 : 0.f;
{
int i; for (i=0;i<spacing;i++) printf(".");
// LOL BEGIN
int j; for (j=0;j<spacing;j++) printf(".");
// LOL END
}
printf("%d -- %s (%.2f %%) :: %.3f ms / frame (%d calls)\n",i, profileIterator->Get_Current_Name(), fraction,(current_total_time / (double)frames_since_reset),profileIterator->Get_Current_Total_Calls());
totalTime += current_total_time;


+ 2
- 0
src/easymesh/easymesh-scanner.l View File

@@ -127,6 +127,8 @@ lol::EasyMeshScanner::~EasyMeshScanner()

int lol::EasyMeshScanner::LexerInput(char* buf, int max_size)
{
(void)max_size; /* unused for now */

buf[0] = m_input[0];
if (buf[0])
++m_input;


+ 2
- 1
src/eglapp.cpp View File

@@ -263,7 +263,8 @@ EglApp::EglApp(char const *title, ivec2 res, float fps) :

void EglApp::ShowPointer(bool show)
{
;
/* FIXME: unimplemented (do we have a mouse pointer anyway? */
(void)show;
}

void EglApp::Run()


+ 2
- 0
src/generated/easymesh-scanner.cpp View File

@@ -1844,6 +1844,8 @@ lol::EasyMeshScanner::~EasyMeshScanner()

int lol::EasyMeshScanner::LexerInput(char* buf, int max_size)
{
(void)max_size; /* unused for now */

buf[0] = m_input[0];
if (buf[0])
++m_input;


+ 2
- 0
src/platform/sdl/sdlinput.cpp View File

@@ -196,6 +196,8 @@ void SdlInputData::Tick(float seconds)
for (int i = 0; i < 256; i++)
if (keystate[i])
Input::KeyPressed(i, seconds);
#else
(void)seconds;
#endif
#endif
}


+ 2
- 0
src/tileset.cpp View File

@@ -230,6 +230,8 @@ ivec2 TileSet::GetCount() const

ivec2 TileSet::GetSize(int tileid) const
{
(void)tileid;

return data->size;
}



Loading…
Cancel
Save