start to replace old C-style casts with static_cast or reinterpret_cast, avoid implicit casts

This commit is contained in:
wmayer
2019-09-16 17:59:18 +02:00
parent 0aaa43a303
commit 52916175ed
10 changed files with 136 additions and 245 deletions

View File

@@ -41,9 +41,9 @@ template <typename T>
inline Vector3<T> getVectorFromTuple(PyObject* o)
{
Py::Sequence tuple(o);
T x = (T)Py::Float(tuple.getItem(0));
T y = (T)Py::Float(tuple.getItem(1));
T z = (T)Py::Float(tuple.getItem(2));
T x = static_cast<T>(Py::Float(tuple.getItem(0)));
T y = static_cast<T>(Py::Float(tuple.getItem(1)));
T z = static_cast<T>(Py::Float(tuple.getItem(2)));
return Vector3<T>(x,y,z);
}