@@ -23,23 +23,23 @@ struct aligned_storage {
2323
2424template <class Data >
2525struct aligned_instance {
26- PyObject_VAR_HEAD PyObject * dict;
27- PyObject * weakrefs;
28- boost::python::instance_holder * objects;
26+ PyObject_VAR_HEAD PyObject* dict;
27+ PyObject* weakrefs;
28+ boost::python::instance_holder* objects;
2929
3030 typename aligned_storage<sizeof (Data)>::type storage;
3131};
3232
33- inline void * aligned_malloc (
33+ inline void * aligned_malloc (
3434 std::size_t size, std::size_t alignment = EIGENPY_DEFAULT_ALIGN_BYTES) {
35- void * original = std::malloc (size + alignment);
35+ void * original = std::malloc (size + alignment);
3636 if (original == 0 ) return 0 ;
3737 if (is_aligned (original, alignment)) return original;
38- void * aligned =
39- reinterpret_cast <void *>((reinterpret_cast <std::size_t >(original) &
40- ~(std::size_t (alignment - 1 ))) +
41- alignment);
42- *(reinterpret_cast <void **>(aligned) - 1 ) = original;
38+ void * aligned =
39+ reinterpret_cast <void *>((reinterpret_cast <std::size_t >(original) &
40+ ~(std::size_t (alignment - 1 ))) +
41+ alignment);
42+ *(reinterpret_cast <void **>(aligned) - 1 ) = original;
4343 return aligned;
4444}
4545
@@ -52,50 +52,50 @@ namespace detail {
5252template <typename Scalar, int Rows, int Cols, int Options, int MaxRows,
5353 int MaxCols>
5454struct referent_storage <
55- Eigen::Matrix<Scalar, Rows, Cols, Options, MaxRows, MaxCols> &> {
55+ Eigen::Matrix<Scalar, Rows, Cols, Options, MaxRows, MaxCols>&> {
5656 typedef Eigen::Matrix<Scalar, Rows, Cols, Options, MaxRows, MaxCols> T;
5757 typedef
58- typename eigenpy::aligned_storage<referent_size<T &>::value>::type type;
58+ typename eigenpy::aligned_storage<referent_size<T&>::value>::type type;
5959};
6060
6161template <typename Scalar, int Rows, int Cols, int Options, int MaxRows,
6262 int MaxCols>
6363struct referent_storage <
64- const Eigen::Matrix<Scalar, Rows, Cols, Options, MaxRows, MaxCols> &> {
64+ const Eigen::Matrix<Scalar, Rows, Cols, Options, MaxRows, MaxCols>&> {
6565 typedef Eigen::Matrix<Scalar, Rows, Cols, Options, MaxRows, MaxCols> T;
6666 typedef
67- typename eigenpy::aligned_storage<referent_size<T &>::value>::type type;
67+ typename eigenpy::aligned_storage<referent_size<T&>::value>::type type;
6868};
6969
7070#ifdef EIGENPY_WITH_TENSOR_SUPPORT
7171template <typename Scalar, int Rank, int Options, typename IndexType>
72- struct referent_storage <Eigen::Tensor<Scalar, Rank, Options, IndexType> &> {
72+ struct referent_storage <Eigen::Tensor<Scalar, Rank, Options, IndexType>&> {
7373 typedef Eigen::Tensor<Scalar, Rank, Options, IndexType> T;
7474 typedef
75- typename eigenpy::aligned_storage<referent_size<T &>::value>::type type;
75+ typename eigenpy::aligned_storage<referent_size<T&>::value>::type type;
7676};
7777
7878template <typename Scalar, int Rank, int Options, typename IndexType>
7979struct referent_storage <
80- const Eigen::Tensor<Scalar, Rank, Options, IndexType> &> {
80+ const Eigen::Tensor<Scalar, Rank, Options, IndexType>&> {
8181 typedef Eigen::Tensor<Scalar, Rank, Options, IndexType> T;
8282 typedef
83- typename eigenpy::aligned_storage<referent_size<T &>::value>::type type;
83+ typename eigenpy::aligned_storage<referent_size<T&>::value>::type type;
8484};
8585#endif
8686
8787template <typename Scalar, int Options>
88- struct referent_storage <Eigen::Quaternion<Scalar, Options> &> {
88+ struct referent_storage <Eigen::Quaternion<Scalar, Options>&> {
8989 typedef Eigen::Quaternion<Scalar, Options> T;
9090 typedef
91- typename eigenpy::aligned_storage<referent_size<T &>::value>::type type;
91+ typename eigenpy::aligned_storage<referent_size<T&>::value>::type type;
9292};
9393
9494template <typename Scalar, int Options>
95- struct referent_storage <const Eigen::Quaternion<Scalar, Options> &> {
95+ struct referent_storage <const Eigen::Quaternion<Scalar, Options>&> {
9696 typedef Eigen::Quaternion<Scalar, Options> T;
9797 typedef
98- typename eigenpy::aligned_storage<referent_size<T &>::value>::type type;
98+ typename eigenpy::aligned_storage<referent_size<T&>::value>::type type;
9999};
100100
101101} // namespace detail
@@ -119,10 +119,10 @@ namespace eigenpy {
119119
120120template <class T >
121121struct call_destructor {
122- static void run (void * bytes) {
122+ static void run (void * bytes) {
123123 typedef typename boost::remove_const<
124124 typename boost::remove_reference<T>::type>::type T_;
125- static_cast <T_ *>((void *)bytes)->~T_ ();
125+ static_cast <T_*>((void *)bytes)->~T_ ();
126126 }
127127};
128128
@@ -143,22 +143,22 @@ struct rvalue_from_python_data
143143
144144 // The usual constructor
145145 rvalue_from_python_data (
146- ::boost::python::converter::rvalue_from_python_stage1_data const
147- & _stage1) {
146+ ::boost::python::converter::rvalue_from_python_stage1_data const &
147+ _stage1) {
148148 this ->stage1 = _stage1;
149149 }
150150
151151 // This constructor just sets m_convertible -- used by
152152 // implicitly_convertible<> to perform the final step of the
153153 // conversion, where the construct() function is already known.
154- rvalue_from_python_data (void * convertible) {
154+ rvalue_from_python_data (void * convertible) {
155155 this ->stage1 .convertible = convertible;
156156 }
157157
158158 // Destroys any object constructed in the storage.
159159 ~rvalue_from_python_data () {
160160 if (this ->stage1 .convertible == this ->storage .bytes ) {
161- void * storage = reinterpret_cast <void *>(this ->storage .bytes );
161+ void * storage = reinterpret_cast <void *>(this ->storage .bytes );
162162 call_destructor<T>::run (storage);
163163 }
164164 }
0 commit comments