@@ -101,7 +101,7 @@ class MathVector
101
101
static const std::size_t Size = N;
102
102
103
103
public:
104
- MathVector () {}
104
+ MathVector () {for (std:: size_t i = 0 ; i < N; ++i) m_data[i] = 0.0 ; }
105
105
MathVector (const value_type& val) {for (std::size_t i = 0 ; i < N; ++i) m_data[i] = val;}
106
106
MathVector (const MathVector& v) {assign (v);}
107
107
@@ -234,11 +234,8 @@ class MathVector<1, T>
234
234
static const std::size_t Size = 1 ;
235
235
236
236
public:
237
- MathVector () {}
238
- MathVector (value_type x)
239
- {
240
- m_data[0 ] = x;
241
- }
237
+ MathVector () {m_data[0 ] = 0.0 ; }
238
+ MathVector (value_type x) { m_data[0 ] = x; }
242
239
MathVector (const MathVector<1 , T>& v) {assign (v);}
243
240
244
241
static inline MathVector from (const MathVector<0 , T>& v) {return MathVector (0 );}
@@ -301,7 +298,7 @@ class MathVector<2, T>
301
298
static const std::size_t Size = 2 ;
302
299
303
300
public:
304
- MathVector () {}
301
+ MathVector () { m_data[ 0 ] = m_data[ 1 ] = 0.0 ; }
305
302
MathVector (const value_type& val) {m_data[0 ] = m_data[1 ] = val;}
306
303
MathVector (value_type x, value_type y)
307
304
{
@@ -373,7 +370,7 @@ class MathVector<3, T>
373
370
static const std::size_t Size = 3 ;
374
371
375
372
public:
376
- MathVector () {}
373
+ MathVector () { m_data[ 0 ] = m_data[ 1 ] = m_data[ 2 ] = 0.0 ; }
377
374
MathVector (const value_type& val) {m_data[0 ] = m_data[1 ] = m_data[2 ] = val;}
378
375
MathVector (value_type x, value_type y, value_type z)
379
376
{
@@ -451,7 +448,7 @@ class MathVector<4, T>
451
448
static const std::size_t Size = 4 ;
452
449
453
450
public:
454
- MathVector () {}
451
+ MathVector () {m_data[ 0 ] = m_data[ 1 ] = m_data[ 2 ] = m_data[ 3 ] = 0.0 ; }
455
452
MathVector (const value_type& val) {m_data[0 ] = m_data[1 ] = m_data[2 ] = m_data[3 ] =val;}
456
453
MathVector (value_type x, value_type y, value_type z, value_type w)
457
454
{
0 commit comments