Skip to content
Snippets Groups Projects
Verified Commit a8865898 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

all: fix compilation warnings

parent b6a9c328
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,7 @@ namespace eigenpy
template<typename Scalar>
bool np_type_is_convertible_into_scalar(const int np_type)
{
if(NumpyEquivalentType<Scalar>::type_code >= NPY_USERDEF)
if(static_cast<NPY_TYPES>(NumpyEquivalentType<Scalar>::type_code) >= NPY_USERDEF)
return np_type == Register::getTypeCode<Scalar>();
if(NumpyEquivalentType<Scalar>::type_code == np_type)
......
......@@ -33,7 +33,7 @@ namespace eigenpy
int EIGENPY_DLLAPI PyArray_TypeNum(PyTypeObject * type);
// By default, the Scalar is considered as a Python object
template <typename Scalar> struct NumpyEquivalentType { enum { type_code = NPY_USERDEF };};
template <typename Scalar> struct NumpyEquivalentType { enum { type_code = NPY_USERDEF };};
template <> struct NumpyEquivalentType<float> { enum { type_code = NPY_FLOAT };};
template <> struct NumpyEquivalentType< std::complex<float> > { enum { type_code = NPY_CFLOAT };};
......
......@@ -17,7 +17,7 @@ namespace eigenpy
{
static To run(const From & from)
{
return static_cast<To>(from);
return (To)from;
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment