diff options
author | Joseph Gilbert <ascotan@gmail.com> | 2007-03-02 00:30:48 +0300 |
---|---|---|
committer | Joseph Gilbert <ascotan@gmail.com> | 2007-03-02 00:30:48 +0300 |
commit | 585edac6d2ef35f9199940e9d45aaef412860e45 (patch) | |
tree | 7dffb1a303879a5d523d4ba592d310941379780b /source/blender/python/api2_2x/meshPrimitive.c | |
parent | ccefcc8a79c1f200feecef6e11ba516953b7b5e2 (diff) |
various warnings fixes - mostly casting and initialization issues
Diffstat (limited to 'source/blender/python/api2_2x/meshPrimitive.c')
-rw-r--r-- | source/blender/python/api2_2x/meshPrimitive.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/python/api2_2x/meshPrimitive.c b/source/blender/python/api2_2x/meshPrimitive.c index 6182159afc2..66dedcc09d7 100644 --- a/source/blender/python/api2_2x/meshPrimitive.c +++ b/source/blender/python/api2_2x/meshPrimitive.c @@ -108,7 +108,7 @@ static PyObject *M_MeshPrim_Plane( PyObject *self_unused, PyObject *args ) return EXPP_ReturnPyObjError( PyExc_TypeError, "expected optional float arg" ); - size *= sqrt(2.0)/2.0; + size *= (float)(sqrt(2.0)/2.0); return make_mesh( 0, "Plane", 4, 0, 0, size, -size, 0, 1 ); } @@ -120,14 +120,14 @@ static PyObject *M_MeshPrim_Cube( PyObject *self_unused, PyObject *args ) return EXPP_ReturnPyObjError( PyExc_TypeError, "expected optional float arg" ); - size *= sqrt(2.0)/2.0; + size *= (float)(sqrt(2.0)/2.0); return make_mesh( 1, "Cube", 4, 0, 0, size, -size, 1, 1 ); } static PyObject *M_MeshPrim_Circle( PyObject *self_unused, PyObject *args ) { int tot = 32; - float size = 2.0*sqrt(2.0); + float size = (float)(2.0*sqrt(2.0)); if( !PyArg_ParseTuple( args, "|if", &tot, &size ) ) return EXPP_ReturnPyObjError( PyExc_TypeError, @@ -143,7 +143,7 @@ static PyObject *M_MeshPrim_Circle( PyObject *self_unused, PyObject *args ) static PyObject *M_MeshPrim_Cylinder( PyObject *self_unused, PyObject *args ) { int tot = 32; - float size = 2.0*sqrt(2.0); + float size = (float)(2.0*sqrt(2.0)); float len = 1.0; if( !PyArg_ParseTuple( args, "|iff", &tot, &size, &len ) ) @@ -160,7 +160,7 @@ static PyObject *M_MeshPrim_Cylinder( PyObject *self_unused, PyObject *args ) static PyObject *M_MeshPrim_Tube( PyObject *self_unused, PyObject *args ) { int tot = 32; - float size = 2.0*sqrt(2.0); + float size = (float)(2.0*sqrt(2.0)); float len = 1.0; if( !PyArg_ParseTuple( args, "|iff", &tot, &size, &len ) ) @@ -177,7 +177,7 @@ static PyObject *M_MeshPrim_Tube( PyObject *self_unused, PyObject *args ) static PyObject *M_MeshPrim_Cone( PyObject *self_unused, PyObject *args ) { int tot = 32; - float size = 2.0*sqrt(2.0); + float size = (float)(2.0*sqrt(2.0)); float len = 1.0; if( !PyArg_ParseTuple( args, "|iff", &tot, &size, &len ) ) @@ -212,7 +212,7 @@ static PyObject *M_MeshPrim_UVsphere( PyObject *self_unused, PyObject *args ) { int segs = 32; int rings = 32; - float size = 2.0*sqrt(2.0); + float size = (float)(2.0*sqrt(2.0)); if( !PyArg_ParseTuple( args, "|iif", &segs, &rings, &size ) ) return EXPP_ReturnPyObjError( PyExc_TypeError, @@ -228,7 +228,7 @@ static PyObject *M_MeshPrim_UVsphere( PyObject *self_unused, PyObject *args ) static PyObject *M_MeshPrim_Icosphere( PyObject *self_unused, PyObject *args ) { int subdiv = 2; - float size = 2.0*sqrt(2.0); + float size = (float)(2.0*sqrt(2.0)); if( !PyArg_ParseTuple( args, "|if", &subdiv, &size ) ) return EXPP_ReturnPyObjError( PyExc_TypeError, |