diff options
author | Anton Babushkin <anton.babushkin@me.com> | 2013-12-19 16:58:25 +0400 |
---|---|---|
committer | Anton Babushkin <anton.babushkin@me.com> | 2013-12-19 16:58:25 +0400 |
commit | 2df2fd1d252fe1e53d86416070557dec8c996891 (patch) | |
tree | ddcd6134ec920442c481fd9de42f3a6d813b3f89 /src/lib/mathlib/math/Matrix.hpp | |
parent | ba612c3ee8b88b9352e7cfa723997887dd736b76 (diff) | |
download | px4-firmware-2df2fd1d252fe1e53d86416070557dec8c996891.tar.gz px4-firmware-2df2fd1d252fe1e53d86416070557dec8c996891.tar.bz2 px4-firmware-2df2fd1d252fe1e53d86416070557dec8c996891.zip |
mathlib minor fixes
Diffstat (limited to 'src/lib/mathlib/math/Matrix.hpp')
-rw-r--r-- | src/lib/mathlib/math/Matrix.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/mathlib/math/Matrix.hpp b/src/lib/mathlib/math/Matrix.hpp index 67214133a..47929ffcb 100644 --- a/src/lib/mathlib/math/Matrix.hpp +++ b/src/lib/mathlib/math/Matrix.hpp @@ -129,7 +129,7 @@ public: */ const Matrix<M, N> &operator =(const Matrix<M, N> &m) { memcpy(data, m.data, sizeof(data)); - return *reinterpret_cast<Matrix<M, N>*>(this); + return *static_cast<Matrix<M, N>*>(this); } /** @@ -158,7 +158,7 @@ public: for (unsigned int i = 0; i < N; i++) for (unsigned int j = 0; j < M; j++) data[i][j] += m.data[i][j]; - return *reinterpret_cast<Matrix<M, N>*>(this); + return *static_cast<Matrix<M, N>*>(this); } /** @@ -176,7 +176,7 @@ public: for (unsigned int i = 0; i < N; i++) for (unsigned int j = 0; j < M; j++) data[i][j] -= m.data[i][j]; - return *reinterpret_cast<Matrix<M, N>*>(this); + return *static_cast<Matrix<M, N>*>(this); } /** @@ -194,7 +194,7 @@ public: for (unsigned int i = 0; i < M; i++) for (unsigned int j = 0; j < N; j++) data[i][j] *= num; - return *reinterpret_cast<Matrix<M, N>*>(this); + return *static_cast<Matrix<M, N>*>(this); } Matrix<M, N> operator /(const float num) const { |