diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-27 00:49:33 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-27 00:49:33 +0400 |
commit | 83e83e5eff1a19748c11d234bb903973f80fc1aa (patch) | |
tree | 9d2f2de2de06fb47c554a9f642930cf32362c616 /source/gameengine/Ketsji/KX_PyMath.cpp | |
parent | abf551b1a51fe7991be0eb9a8ced6a9c4db927e5 (diff) |
quiet some warnings for gcc 4.7
Diffstat (limited to 'source/gameengine/Ketsji/KX_PyMath.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_PyMath.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/gameengine/Ketsji/KX_PyMath.cpp b/source/gameengine/Ketsji/KX_PyMath.cpp index 9c5e043477c..f459b806d2f 100644 --- a/source/gameengine/Ketsji/KX_PyMath.cpp +++ b/source/gameengine/Ketsji/KX_PyMath.cpp @@ -146,7 +146,8 @@ PyObject* PyObjectFrom(const MT_Matrix3x3 &mat) PyObject* PyObjectFrom(const MT_Quaternion &qrot) { /* NOTE, were re-ordering here for Mathutils compat */ - float fvec[4]= {qrot[3], qrot[0], qrot[1], qrot[2]}; + float fvec[4]; + qrot.getValue(fvec); return Quaternion_CreatePyObject(fvec, Py_NEW, NULL); } #endif @@ -154,7 +155,8 @@ PyObject* PyObjectFrom(const MT_Quaternion &qrot) PyObject* PyObjectFrom(const MT_Tuple4 &vec) { #ifdef USE_MATHUTILS - float fvec[4]= {vec[0], vec[1], vec[2], vec[3]}; + float fvec[4]; + vec.getValue(fvec); return Vector_CreatePyObject(fvec, 4, Py_NEW, NULL); #else PyObject *list = PyList_New(4); @@ -169,7 +171,8 @@ PyObject* PyObjectFrom(const MT_Tuple4 &vec) PyObject* PyObjectFrom(const MT_Tuple3 &vec) { #ifdef USE_MATHUTILS - float fvec[3]= {vec[0], vec[1], vec[2]}; + float fvec[3]; + vec.getValue(fvec); return Vector_CreatePyObject(fvec, 3, Py_NEW, NULL); #else PyObject *list = PyList_New(3); @@ -183,7 +186,8 @@ PyObject* PyObjectFrom(const MT_Tuple3 &vec) PyObject* PyObjectFrom(const MT_Tuple2 &vec) { #ifdef USE_MATHUTILS - float fvec[2]= {vec[0], vec[1]}; + float fvec[2]; + vec.getValue(fvec); return Vector_CreatePyObject(fvec, 2, Py_NEW, NULL); #else PyObject *list = PyList_New(2); |