mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 03:33:34 +08:00
constructors use array size rather than pointers
This commit is contained in:
+3
-3
@@ -24,7 +24,7 @@ namespace matrix
|
||||
template <typename Type, size_t M>
|
||||
class Vector;
|
||||
|
||||
template<typename Type, size_t M, size_t N>
|
||||
template<typename Type, size_t M, size_t N>
|
||||
class Matrix
|
||||
{
|
||||
|
||||
@@ -35,12 +35,12 @@ public:
|
||||
// Constructors
|
||||
Matrix() = default;
|
||||
|
||||
Matrix(const Type data_[][N])
|
||||
Matrix(const Type data_[M*N])
|
||||
{
|
||||
memcpy(_data, data_, sizeof(_data));
|
||||
}
|
||||
|
||||
Matrix(const Type *data_)
|
||||
Matrix(const Type data_[M][N])
|
||||
{
|
||||
memcpy(_data, data_, sizeof(_data));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user