forked from bartvdbraak/blender
code cleanup: bge builds with clang without warnings / errors.
This commit is contained in:
parent
bd21001aaf
commit
aeee798143
@ -24,7 +24,6 @@
|
|||||||
* \ingroup RNA
|
* \ingroup RNA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "RNA_access.h"
|
#include "RNA_access.h"
|
||||||
@ -37,6 +36,8 @@
|
|||||||
#include "DNA_action_types.h"
|
#include "DNA_action_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
|
|
||||||
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
#include "MEM_guardedalloc.h"
|
#include "MEM_guardedalloc.h"
|
||||||
|
|
||||||
#include "ED_keyframing.h"
|
#include "ED_keyframing.h"
|
||||||
@ -463,7 +464,8 @@ static FCurve *rna_Driver_from_existing(AnimData *adt, bContext *C, FCurve *src_
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
/* helper function for Keying Set -> keying settings */
|
/* helper function for Keying Set -> keying settings */
|
||||||
static void rna_def_common_keying_flags(StructRNA *srna, short reg)
|
/* TODO: use reg option! */
|
||||||
|
static void rna_def_common_keying_flags(StructRNA *srna, short UNUSED(reg))
|
||||||
{
|
{
|
||||||
PropertyRNA *prop;
|
PropertyRNA *prop;
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
* \ingroup RNA
|
* \ingroup RNA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "RNA_define.h"
|
#include "RNA_define.h"
|
||||||
@ -36,6 +35,8 @@
|
|||||||
#include "DNA_material_types.h"
|
#include "DNA_material_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
|
|
||||||
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
#include "BKE_font.h"
|
#include "BKE_font.h"
|
||||||
|
|
||||||
#include "WM_types.h"
|
#include "WM_types.h"
|
||||||
@ -845,7 +846,7 @@ static void rna_def_beztriple(BlenderRNA *brna)
|
|||||||
RNA_def_struct_path_func(srna, "rna_Curve_spline_point_path");
|
RNA_def_struct_path_func(srna, "rna_Curve_spline_point_path");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rna_def_path(BlenderRNA *brna, StructRNA *srna)
|
static void rna_def_path(BlenderRNA *UNUSED(brna), StructRNA *srna)
|
||||||
{
|
{
|
||||||
PropertyRNA *prop;
|
PropertyRNA *prop;
|
||||||
|
|
||||||
@ -894,7 +895,7 @@ static void rna_def_path(BlenderRNA *brna, StructRNA *srna)
|
|||||||
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
|
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rna_def_nurbs(BlenderRNA *brna, StructRNA *srna)
|
static void rna_def_nurbs(BlenderRNA *UNUSED(brna), StructRNA *srna)
|
||||||
{
|
{
|
||||||
PropertyRNA *prop;
|
PropertyRNA *prop;
|
||||||
|
|
||||||
@ -905,7 +906,7 @@ static void rna_def_nurbs(BlenderRNA *brna, StructRNA *srna)
|
|||||||
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
|
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
|
static void rna_def_font(BlenderRNA *UNUSED(brna), StructRNA *srna)
|
||||||
{
|
{
|
||||||
PropertyRNA *prop;
|
PropertyRNA *prop;
|
||||||
|
|
||||||
|
@ -549,7 +549,8 @@ void RNA_struct_free(BlenderRNA *brna, StructRNA *srna)
|
|||||||
|
|
||||||
if (srna->flag & STRUCT_RUNTIME)
|
if (srna->flag & STRUCT_RUNTIME)
|
||||||
rna_freelinkN(&brna->structs, srna);
|
rna_freelinkN(&brna->structs, srna);
|
||||||
|
#else
|
||||||
|
(void)brna, (void)srna;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,10 +69,6 @@ protected:
|
|||||||
|
|
||||||
class RAS_IRenderTools* m_rendertools; //needed for drawing routine
|
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
|
#ifdef WITH_PYTHON
|
||||||
static PyObject* pyattr_get_text(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
|
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);
|
static int pyattr_set_text(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
|
||||||
|
@ -40,7 +40,7 @@ namespace
|
|||||||
inline float vdist(const float* a, const float* b) { return sqrtf(vdistsqr(a,b)); }
|
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 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 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 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 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; }
|
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 vlensqr(const float* v) { return vdot(v,v); }
|
||||||
inline float vlen(const float* v) { return sqrtf(vlensqr(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 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)
|
inline void vnorm(float* v)
|
||||||
{
|
{
|
||||||
float d = vlen(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))
|
p1, p2, ob->m_rad, htmin, htmax))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (htmin > 0.0f)
|
if (htmin > 0.0f)
|
||||||
{
|
{
|
||||||
@ -743,6 +746,9 @@ static void processSamples(KX_Obstacle* activeObst, KX_NavMeshObject* activeNavM
|
|||||||
// Avoid less when facing walls.
|
// Avoid less when facing walls.
|
||||||
htmin *= 2.0f;
|
htmin *= 2.0f;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (htmin >= 0.0f)
|
if (htmin >= 0.0f)
|
||||||
{
|
{
|
||||||
|
@ -323,7 +323,7 @@ void RAS_2DFilterManager::SetupTextures(bool depth, bool luminance)
|
|||||||
|
|
||||||
void RAS_2DFilterManager::UpdateOffsetMatrix(RAS_ICanvas* canvas)
|
void RAS_2DFilterManager::UpdateOffsetMatrix(RAS_ICanvas* canvas)
|
||||||
{
|
{
|
||||||
RAS_Rect canvas_rect = canvas->GetWindowArea();
|
/* RAS_Rect canvas_rect = canvas->GetWindowArea(); */ /* UNUSED */
|
||||||
texturewidth = canvas->GetWidth();
|
texturewidth = canvas->GetWidth();
|
||||||
textureheight = canvas->GetHeight();
|
textureheight = canvas->GetHeight();
|
||||||
GLint i,j;
|
GLint i,j;
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
RAS_VAOpenGLRasterizer::RAS_VAOpenGLRasterizer(RAS_ICanvas* canvas, bool lock)
|
RAS_VAOpenGLRasterizer::RAS_VAOpenGLRasterizer(RAS_ICanvas* canvas, bool lock)
|
||||||
: RAS_OpenGLRasterizer(canvas),
|
: 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_texco_num(0),
|
||||||
m_last_attrib_num(0)
|
m_last_attrib_num(0)
|
||||||
{
|
{
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
class RAS_VAOpenGLRasterizer : public RAS_OpenGLRasterizer
|
class RAS_VAOpenGLRasterizer : public RAS_OpenGLRasterizer
|
||||||
{
|
{
|
||||||
void TexCoordPtr(const RAS_TexVert *tv);
|
void TexCoordPtr(const RAS_TexVert *tv);
|
||||||
bool m_Lock;
|
/* bool m_Lock; */ /* UNUSED */
|
||||||
|
|
||||||
TexCoGen m_last_texco[RAS_MAX_TEXCO];
|
TexCoGen m_last_texco[RAS_MAX_TEXCO];
|
||||||
TexCoGen m_last_attrib[RAS_MAX_ATTRIB];
|
TexCoGen m_last_attrib[RAS_MAX_ATTRIB];
|
||||||
|
Loading…
Reference in New Issue
Block a user