mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Stop using std::tr1::array<> since it is padded (alignment) on gcc 4.1 (CentOS 5.7).
This commit is contained in:
@@ -47,9 +47,9 @@ namespace Opm
|
|||||||
SmallVec()
|
SmallVec()
|
||||||
{}
|
{}
|
||||||
SmallVec(const T& elem)
|
SmallVec(const T& elem)
|
||||||
{ data_.assign(elem); } // In C++11, assign -> fill
|
{ assign(elem); }
|
||||||
SmallVec& operator=(const T& elem)
|
SmallVec& operator=(const T& elem)
|
||||||
{ data_.assign(elem); return *this; }
|
{ assign(elem); return *this; }
|
||||||
const T& operator[](int i) const
|
const T& operator[](int i) const
|
||||||
{ return data_[i]; }
|
{ return data_[i]; }
|
||||||
T& operator[](int i)
|
T& operator[](int i)
|
||||||
@@ -62,7 +62,7 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
std::tr1::array<T, N> data_;
|
T data_[N];
|
||||||
};
|
};
|
||||||
template <typename T, int Rows, int Cols>
|
template <typename T, int Rows, int Cols>
|
||||||
class SmallMat
|
class SmallMat
|
||||||
@@ -71,7 +71,7 @@ namespace Opm
|
|||||||
SmallMat()
|
SmallMat()
|
||||||
{}
|
{}
|
||||||
SmallMat(const T& elem)
|
SmallMat(const T& elem)
|
||||||
{ data_.assign(elem); } // In C++11, assign -> fill
|
{ data_.assign(elem); }
|
||||||
SmallMat& operator=(const T& elem)
|
SmallMat& operator=(const T& elem)
|
||||||
{ data_.assign(elem); return *this; }
|
{ data_.assign(elem); return *this; }
|
||||||
typedef SmallVec<T, Cols> RowType;
|
typedef SmallVec<T, Cols> RowType;
|
||||||
|
|||||||
Reference in New Issue
Block a user