From 62d3b683c7ca9dc10c67c09576660f55a3cf67fc Mon Sep 17 00:00:00 2001 From: Justin Carpentier <justin.carpentier@inria.fr> Date: Fri, 30 Jul 2021 13:55:03 +0200 Subject: [PATCH] types: use static_cast --- include/eigenpy/user-type.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/eigenpy/user-type.hpp b/include/eigenpy/user-type.hpp index 53d08de..31ccdeb 100644 --- a/include/eigenpy/user-type.hpp +++ b/include/eigenpy/user-type.hpp @@ -194,8 +194,9 @@ namespace eigenpy inline static int fillwithscalar(void* buffer_, npy_intp length, void* value, void* /*arr*/) { - T r = *(T*)value; - T* buffer = (T*)buffer_; +// std::cout << "fillwithscalar" << std::endl; + T r = *static_cast<T*>(value); + T* buffer = static_cast<T*>(buffer_); npy_intp i; for (i = 0; i < length; i++) { buffer[i] = r; -- GitLab