[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34859] trunk/blender/source/blender: fix warnings.
Campbell Barton
ideasman42 at gmail.com
Tue Feb 15 04:20:14 CET 2011
Revision: 34859
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34859
Author: campbellbarton
Date: 2011-02-15 03:20:12 +0000 (Tue, 15 Feb 2011)
Log Message:
-----------
fix warnings.
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/mikktspace.c
trunk/blender/source/blender/python/intern/bpy_driver.h
trunk/blender/source/blender/python/intern/bpy_operator_wrap.h
Modified: trunk/blender/source/blender/blenkernel/intern/mikktspace.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/mikktspace.c 2011-02-15 01:24:12 UTC (rev 34858)
+++ trunk/blender/source/blender/blenkernel/intern/mikktspace.c 2011-02-15 03:20:12 UTC (rev 34859)
@@ -41,12 +41,12 @@
float x, y, z;
} SVec3;
-tbool veq( const SVec3 v1, const SVec3 v2 )
+static tbool veq( const SVec3 v1, const SVec3 v2 )
{
return (v1.x == v2.x) && (v1.y == v2.y) && (v1.z == v2.z);
}
-const SVec3 vadd( const SVec3 v1, const SVec3 v2 )
+static const SVec3 vadd( const SVec3 v1, const SVec3 v2 )
{
SVec3 vRes;
@@ -58,7 +58,7 @@
}
-const SVec3 vsub( const SVec3 v1, const SVec3 v2 )
+static const SVec3 vsub( const SVec3 v1, const SVec3 v2 )
{
SVec3 vRes;
@@ -69,7 +69,7 @@
return vRes;
}
-const SVec3 vscale(const float fS, const SVec3 v)
+static const SVec3 vscale(const float fS, const SVec3 v)
{
SVec3 vRes;
@@ -80,34 +80,34 @@
return vRes;
}
-float LengthSquared( const SVec3 v )
+static float LengthSquared( const SVec3 v )
{
return v.x*v.x + v.y*v.y + v.z*v.z;
}
-float Length( const SVec3 v )
+static float Length( const SVec3 v )
{
return sqrtf(LengthSquared(v));
}
-const SVec3 Normalize( const SVec3 v )
+static const SVec3 Normalize( const SVec3 v )
{
return vscale(1 / Length(v), v);
}
-const float vdot( const SVec3 v1, const SVec3 v2)
+static const float vdot( const SVec3 v1, const SVec3 v2)
{
return v1.x*v2.x + v1.y*v2.y + v1.z*v2.z;
}
-tbool NotZero(const float fX)
+static tbool NotZero(const float fX)
{
// could possibly use FLT_EPSILON instead
return fabsf(fX) > FLT_MIN;
}
-tbool VNotZero(const SVec3 v)
+static tbool VNotZero(const SVec3 v)
{
// might change this to an epsilon based test
return NotZero(v.x) || NotZero(v.y) || NotZero(v.z);
@@ -170,19 +170,19 @@
const int iNrActiveGroups, const int piTriListIn[], const float fThresCos,
const SMikkTSpaceContext * pContext);
-int MakeIndex(const int iFace, const int iVert)
+static int MakeIndex(const int iFace, const int iVert)
{
assert(iVert>=0 && iVert<4 && iFace>=0);
return (iFace<<2) | (iVert&0x3);
}
-void IndexToData(int * piFace, int * piVert, const int iIndexIn)
+static void IndexToData(int * piFace, int * piVert, const int iIndexIn)
{
piVert[0] = iIndexIn&0x3;
piFace[0] = iIndexIn>>2;
}
-const STSpace AvgTSpace(const STSpace * pTS0, const STSpace * pTS1)
+static const STSpace AvgTSpace(const STSpace * pTS0, const STSpace * pTS1)
{
STSpace ts_res;
@@ -429,12 +429,12 @@
int index;
} STmpVert;
-const int g_iCells = 2048;
+static const int g_iCells = 2048;
// it is IMPORTANT that this function is called to evaluate the hash since
// inlining could potentially reorder instructions and generate different
// results for the same effective input value fVal.
-volatile int FindGridCell(const float fMin, const float fMax, const float fVal)
+static volatile int FindGridCell(const float fMin, const float fMax, const float fVal)
{
const float fIndex = (g_iCells-1) * ((fVal-fMin)/(fMax-fMin));
const int iIndex = fIndex<0?0:((int) (fIndex+0.5f));
@@ -915,7 +915,7 @@
void BuildNeighborsSlow(STriInfo pTriInfos[], const int piTriListIn[], const int iNrTrianglesIn);
// returns the texture area times 2
-float CalcTexArea(const SMikkTSpaceContext * pContext, const int indices[])
+static float CalcTexArea(const SMikkTSpaceContext * pContext, const int indices[])
{
const SVec3 t1 = GetTexCoord(pContext, indices[0]);
const SVec3 t2 = GetTexCoord(pContext, indices[1]);
@@ -1455,8 +1455,8 @@
index = (int) (uSeed%n);
iMid=pSortBuffer[index + iL];
- iTmp;
+
do
{
while(pSortBuffer[iL] < iMid)
Modified: trunk/blender/source/blender/python/intern/bpy_driver.h
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_driver.h 2011-02-15 01:24:12 UTC (rev 34858)
+++ trunk/blender/source/blender/python/intern/bpy_driver.h 2011-02-15 03:20:12 UTC (rev 34859)
@@ -27,4 +27,8 @@
int bpy_pydriver_create_dict(void);
extern PyObject *bpy_pydriver_Dict;
+/* externals */
+float BPY_driver_exec(struct ChannelDriver *driver);
+void BPY_driver_reset(void);
+
#endif // BPY_DRIVER_H
Modified: trunk/blender/source/blender/python/intern/bpy_operator_wrap.h
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_operator_wrap.h 2011-02-15 01:24:12 UTC (rev 34858)
+++ trunk/blender/source/blender/python/intern/bpy_operator_wrap.h 2011-02-15 03:20:12 UTC (rev 34859)
@@ -25,6 +25,13 @@
#ifndef BPY_OPERATOR_WRAP_H
#define BPY_OPERATOR_WRAP_H
+struct wmOperatorType;
+
/* these are used for operator methods, used by bpy_operator.c */
PyObject *PYOP_wrap_macro_define(PyObject *self, PyObject *args);
+
+/* exposed to rna/wm api */
+void operator_wrapper(struct wmOperatorType *ot, void *userdata);
+void macro_wrapper(struct wmOperatorType *ot, void *userdata);
+
#endif
More information about the Bf-blender-cvs
mailing list