BUG: various reinterpret_cast to enable strict-aliasing

This commit is contained in:
mattijs
2010-08-19 15:44:17 +01:00
parent c34ed7bfcc
commit 69526c6c1c
31 changed files with 159 additions and 141 deletions

View File

@ -100,6 +100,14 @@ public:
//- Construct given SymmTensor
inline Tensor(const SymmTensor<Cmpt>&);
//- Construct given the three vector components
inline Tensor
(
const Vector<Cmpt>& x,
const Vector<Cmpt>& y,
const Vector<Cmpt>& z
);
//- Construct given the nine components
inline Tensor
(
@ -116,14 +124,6 @@ public:
// Access
inline const Vector<Cmpt>& x() const;
inline const Vector<Cmpt>& y() const;
inline const Vector<Cmpt>& z() const;
inline Vector<Cmpt>& x();
inline Vector<Cmpt>& y();
inline Vector<Cmpt>& z();
inline const Cmpt& xx() const;
inline const Cmpt& xy() const;
inline const Cmpt& xz() const;
@ -144,6 +144,13 @@ public:
inline Cmpt& zy();
inline Cmpt& zz();
// Access vector components.
// Note: returning const only to find out lhs usage
inline const Vector<Cmpt> x() const;
inline const Vector<Cmpt> y() const;
inline const Vector<Cmpt> z() const;
//- Transpose
inline Tensor<Cmpt> T() const;