constructors use array size rather than pointers

This commit is contained in:
Daniel Agar
2018-08-31 08:11:02 +02:00
committed by Beat Küng
parent f1bee775a0
commit dc3af80977
7 changed files with 9 additions and 9 deletions
+3 -3
View File
@@ -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));
}