AP_Math: fix vectorN ctor warning by using C++11 brace initilization in all cases

This commit is contained in:
Pierre Kancir 2021-08-25 12:44:51 +02:00 committed by Andrew Tridgell
parent 085cb72fb5
commit d853d16c42

View File

@ -36,7 +36,9 @@ class VectorN
public:
// trivial ctor
inline VectorN<T,N>() {
memset(_v, 0, sizeof(T)*N);
for (auto i = 0; i < N; i++) {
_v[i] = T{};
}
}
// vector ctor