diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-29 13:16:59 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-29 13:16:59 +0400 |
commit | aeee798143c29ecb502db243dba28082a4a7d993 (patch) | |
tree | 75034c50ab32e682604aa72b5dc3aee84643703d /source/gameengine | |
parent | bd21001aaf69339ff9f4848134a59b2f58b9cf12 (diff) |
code cleanup: bge builds with clang without warnings / errors.
Diffstat (limited to 'source/gameengine')
5 files changed, 11 insertions, 9 deletions
diff --git a/source/gameengine/Ketsji/KX_FontObject.h b/source/gameengine/Ketsji/KX_FontObject.h index 170c9977296..ae8b4166238 100644 --- a/source/gameengine/Ketsji/KX_FontObject.h +++ b/source/gameengine/Ketsji/KX_FontObject.h @@ -69,10 +69,6 @@ protected: class RAS_IRenderTools* m_rendertools; //needed for drawing routine -#ifdef WITH_CXX_GUARDEDALLOC - MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_FontObject") -#endif - #ifdef WITH_PYTHON static PyObject* pyattr_get_text(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef); static int pyattr_set_text(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); diff --git a/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp b/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp index b8169899c78..fd47587e2c8 100644 --- a/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp +++ b/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp @@ -40,7 +40,7 @@ namespace inline float vdist(const float* a, const float* b) { return sqrtf(vdistsqr(a,b)); } inline void vcpy(float* a, const float* b) { a[0]=b[0]; a[1]=b[1]; } inline float vdot(const float* a, const float* b) { return a[0]*b[0] + a[1]*b[1]; } - inline float vperp(const float* a, const float* b) { return a[0]*b[1] - a[1]*b[0]; } +/* inline float vperp(const float* a, const float* b) { return a[0]*b[1] - a[1]*b[0]; } */ /* UNUSED */ inline void vsub(float* v, const float* a, const float* b) { v[0] = a[0]-b[0]; v[1] = a[1]-b[1]; } inline void vadd(float* v, const float* a, const float* b) { v[0] = a[0]+b[0]; v[1] = a[1]+b[1]; } inline void vscale(float* v, const float* a, const float s) { v[0] = a[0]*s; v[1] = a[1]*s; } @@ -48,7 +48,7 @@ namespace inline float vlensqr(const float* v) { return vdot(v,v); } inline float vlen(const float* v) { return sqrtf(vlensqr(v)); } inline void vlerp(float* v, const float* a, const float* b, float t) { v[0] = lerp(a[0], b[0], t); v[1] = lerp(a[1], b[1], t); } - inline void vmad(float* v, const float* a, const float* b, float s) { v[0] = a[0] + b[0]*s; v[1] = a[1] + b[1]*s; } +/* inline void vmad(float* v, const float* a, const float* b, float s) { v[0] = a[0] + b[0]*s; v[1] = a[1] + b[1]*s; } */ /* UNUSED */ inline void vnorm(float* v) { float d = vlen(v); @@ -549,6 +549,9 @@ void KX_ObstacleSimulationTOI_rays::sampleRVO(KX_Obstacle* activeObst, KX_NavMes p1, p2, ob->m_rad, htmin, htmax)) continue; } + else { + continue; + } if (htmin > 0.0f) { @@ -743,6 +746,9 @@ static void processSamples(KX_Obstacle* activeObst, KX_NavMeshObject* activeNavM // Avoid less when facing walls. htmin *= 2.0f; } + else { + continue; + } if (htmin >= 0.0f) { diff --git a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp index f2c2d18c12a..43acb9e5f8a 100644 --- a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp +++ b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp @@ -323,7 +323,7 @@ void RAS_2DFilterManager::SetupTextures(bool depth, bool luminance) void RAS_2DFilterManager::UpdateOffsetMatrix(RAS_ICanvas* canvas) { - RAS_Rect canvas_rect = canvas->GetWindowArea(); + /* RAS_Rect canvas_rect = canvas->GetWindowArea(); */ /* UNUSED */ texturewidth = canvas->GetWidth(); textureheight = canvas->GetHeight(); GLint i,j; diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp index ff24bd639ba..a36229c35d1 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp @@ -42,7 +42,7 @@ RAS_VAOpenGLRasterizer::RAS_VAOpenGLRasterizer(RAS_ICanvas* canvas, bool lock) : RAS_OpenGLRasterizer(canvas), - m_Lock(lock && GLEW_EXT_compiled_vertex_array), + /* m_Lock(lock && GLEW_EXT_compiled_vertex_array), */ /* UNUSED */ m_last_texco_num(0), m_last_attrib_num(0) { diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.h b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.h index 730431d3108..deda1c4603a 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.h +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.h @@ -37,7 +37,7 @@ class RAS_VAOpenGLRasterizer : public RAS_OpenGLRasterizer { void TexCoordPtr(const RAS_TexVert *tv); - bool m_Lock; + /* bool m_Lock; */ /* UNUSED */ TexCoGen m_last_texco[RAS_MAX_TEXCO]; TexCoGen m_last_attrib[RAS_MAX_ATTRIB]; |