mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5448 Remove warnings about uninitialized values in cvf::Vec2/Vec3.
This commit is contained in:
parent
7d20e0da0f
commit
568a135d82
@ -53,7 +53,7 @@ template<typename S>
|
||||
class Vector2
|
||||
{
|
||||
public:
|
||||
Vector2() {}
|
||||
Vector2();
|
||||
Vector2(S x, S y);
|
||||
Vector2(const Vector2& other);
|
||||
|
||||
|
@ -57,6 +57,17 @@ template<typename S> Vector2<S> const Vector2<S>::X_AXIS(1, 0);
|
||||
template<typename S> Vector2<S> const Vector2<S>::Y_AXIS(0, 1);
|
||||
template<typename S> Vector2<S> const Vector2<S>::ZERO(0, 0);
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Default constructor.
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
template<typename S>
|
||||
Vector2<S>::Vector2()
|
||||
{
|
||||
m_v[0] = 0;
|
||||
m_v[1] = 0;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Set the vector to <x,y>
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -59,7 +59,7 @@ template<typename S>
|
||||
class Vector3
|
||||
{
|
||||
public:
|
||||
Vector3() {}
|
||||
Vector3();
|
||||
Vector3(S x, S y, S z);
|
||||
Vector3(const Vector3& other);
|
||||
|
||||
|
@ -58,6 +58,18 @@ template<typename S> Vector3<S> const Vector3<S>::Y_AXIS(0,1,0);
|
||||
template<typename S> Vector3<S> const Vector3<S>::Z_AXIS(0,0,1);
|
||||
template<typename S> Vector3<S> const Vector3<S>::ZERO(0,0,0);
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Default constructor.
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
template<typename S>
|
||||
Vector3<S>::Vector3()
|
||||
{
|
||||
m_v[0] = 0;
|
||||
m_v[1] = 0;
|
||||
m_v[2] = 0;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Set the vector to <x,y,z>
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user