mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: Tuple2 construct null with uninitialized value
Had this:
Tuple2() {}
Instead of:
Tuple2() : f_(), s_() {}
which is the same as
Tuple2() = default;
This meant that Tuple2<scalar, scalar>() was not being zero-initialized
This commit is contained in:
@ -61,8 +61,8 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Null constructor
|
||||
inline Pair();
|
||||
//- Construct null
|
||||
Pair() = default;
|
||||
|
||||
//- Construct from components
|
||||
inline Pair(const T& f, const T& s);
|
||||
|
||||
@ -45,11 +45,6 @@ inline int Foam::Pair<T>::compare(const Pair<T>& a, const Pair<T>& b)
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class T>
|
||||
inline Foam::Pair<T>::Pair()
|
||||
{}
|
||||
|
||||
|
||||
template<class T>
|
||||
inline Foam::Pair<T>::Pair(const T& f, const T& s)
|
||||
{
|
||||
|
||||
@ -57,7 +57,7 @@ inline Ostream& operator<<(Ostream& os, const Tuple2<Type1, Type2>& t2);
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
class Tuple2 Declaration
|
||||
Class Tuple2 Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type1, class Type2>
|
||||
@ -81,9 +81,8 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Null constructor for lists and hashes
|
||||
inline Tuple2()
|
||||
{}
|
||||
//- Construct null
|
||||
inline Tuple2() = default;
|
||||
|
||||
//- Construct from components
|
||||
inline Tuple2(const Type1& f, const Type2& s)
|
||||
|
||||
Reference in New Issue
Block a user