mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 01:31:36 +08:00
Make all array constructors explicit (#99)
* Make all array constructors explicit to avoid accidental implicit casts like e.g. Vector3f v = 0; assigning nullpointer content.
This commit is contained in:
committed by
Julian Kent
parent
7b34c1c51d
commit
740324cf1e
@@ -28,7 +28,12 @@ class SquareMatrix : public Matrix<Type, M, M>
|
||||
public:
|
||||
SquareMatrix() = default;
|
||||
|
||||
SquareMatrix(const Type data_[M][M]) :
|
||||
explicit SquareMatrix(const Type data_[M][M]) :
|
||||
Matrix<Type, M, M>(data_)
|
||||
{
|
||||
}
|
||||
|
||||
explicit SquareMatrix(const Type data_[M*M]) :
|
||||
Matrix<Type, M, M>(data_)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user