UNUSED() macro so -Wunused-parameter can be used with GCC without so many warnings.

applied to python api and exotic.c, removed some args being passed down which were not needed.

keyword args for new mathutils types were being ignored when they should raise an error.
This commit is contained in:
2010-10-13 23:25:08 +00:00
parent a90f876948
commit be32cf8b32
23 changed files with 198 additions and 168 deletions

View File

@@ -45,7 +45,7 @@ static PyObject *Vector_ToTupleExt(VectorObject *self, int ndigits);
//----------------------------------mathutils.Vector() ------------------
// Supports 2D, 3D, and 4D vector objects both int and float values
// accepted. Mixed float and int values accepted. Ints are parsed to float
static PyObject *Vector_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *Vector_new(PyTypeObject *type, PyObject *args, PyObject *UNUSED(kwds))
{
float vec[4]= {0.0f, 0.0f, 0.0f, 0.0f};
int size= 3; /* default to a 3D vector */
@@ -1445,7 +1445,7 @@ static int Vector_setAxis(VectorObject *self, PyObject * value, void * type )
}
/* vector.length */
static PyObject *Vector_getLength(VectorObject *self, void *type )
static PyObject *Vector_getLength(VectorObject *self, void *UNUSED(closure))
{
double dot = 0.0f;
int i;