@@ -45,7 +45,7 @@ namespace Ogre
45
45
// / helper class to implement legacy API. Notably x, y, z access
46
46
template <int dims, typename T> struct VectorBase
47
47
{
48
- VectorBase () {}
48
+ constexpr VectorBase () {}
49
49
constexpr VectorBase (T _x, T _y)
50
50
{
51
51
static_assert (dims > 1 , " must have at least 2 dimensions" );
@@ -67,7 +67,7 @@ namespace Ogre
67
67
};
68
68
template <> struct _OgreExport VectorBase<2 , Real>
69
69
{
70
- VectorBase () {}
70
+ constexpr VectorBase () {}
71
71
constexpr VectorBase (Real _x, Real _y) : x(_x), y(_y) {}
72
72
Real x, y;
73
73
Real* ptr () { return &x; }
@@ -127,7 +127,7 @@ namespace Ogre
127
127
128
128
template <> struct _OgreExport VectorBase<3 , Real>
129
129
{
130
- VectorBase () {}
130
+ constexpr VectorBase () {}
131
131
constexpr VectorBase (Real _x, Real _y, Real _z) : x(_x), y(_y), z(_z) {}
132
132
Real x, y, z;
133
133
Real* ptr () { return &x; }
@@ -256,7 +256,7 @@ namespace Ogre
256
256
257
257
template <> struct _OgreExport VectorBase<4 , Real>
258
258
{
259
- VectorBase () {}
259
+ constexpr VectorBase () {}
260
260
constexpr VectorBase (Real _x, Real _y, Real _z, Real _w) : x(_x), y(_y), z(_z), w(_w) {}
261
261
Real x, y, z, w;
262
262
Real* ptr () { return &x; }
@@ -282,7 +282,7 @@ namespace Ogre
282
282
/* * Default constructor.
283
283
@note It does <b>NOT</b> initialize the vector for efficiency.
284
284
*/
285
- Vector () {}
285
+ constexpr Vector () {}
286
286
constexpr Vector (T _x, T _y) : VectorBase<dims, T>(_x, _y) {}
287
287
constexpr Vector (T _x, T _y, T _z) : VectorBase<dims, T>(_x, _y, _z) {}
288
288
constexpr Vector (T _x, T _y, T _z, T _w) : VectorBase<dims, T>(_x, _y, _z, _w) {}
0 commit comments