mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
fix ICE with gcc 3.4 and 4.0.1
This commit is contained in:
parent
bacd531862
commit
5bc21c25c5
@ -211,6 +211,11 @@ public:
|
|||||||
typedef Block<MatrixType,Dim,1> TranslationPart;
|
typedef Block<MatrixType,Dim,1> TranslationPart;
|
||||||
/** corresponding translation type */
|
/** corresponding translation type */
|
||||||
typedef Translation<Scalar,Dim> TranslationType;
|
typedef Translation<Scalar,Dim> TranslationType;
|
||||||
|
|
||||||
|
// this intermediate enum is needed to avoid an ICE with gcc 3.4 and 4.0
|
||||||
|
enum { TransformTimeDiagonalMode = ((Mode==int(Isometry))?Affine:int(Mode)) };
|
||||||
|
/** The return type of the product between a diagonal matrix and a transform */
|
||||||
|
typedef Transform<Scalar,Dim,TransformTimeDiagonalMode> TransformTimeDiagonalReturnType;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@ -381,10 +386,10 @@ public:
|
|||||||
* mode is no isometry. In that case, the returned transform is an affinity.
|
* mode is no isometry. In that case, the returned transform is an affinity.
|
||||||
*/
|
*/
|
||||||
template<typename DiagonalDerived>
|
template<typename DiagonalDerived>
|
||||||
inline const Transform<Scalar,Dim,((Mode==(int)Isometry)?Affine:(int)Mode)>
|
inline const TransformTimeDiagonalReturnType
|
||||||
operator * (const DiagonalBase<DiagonalDerived> &b) const
|
operator * (const DiagonalBase<DiagonalDerived> &b) const
|
||||||
{
|
{
|
||||||
Transform<Scalar,Dim,((Mode==(int)Isometry)?Affine:(int)Mode)> res(*this);
|
TransformTimeDiagonalReturnType res(*this);
|
||||||
res.linear() *= b;
|
res.linear() *= b;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -396,10 +401,10 @@ public:
|
|||||||
* mode is no isometry. In that case, the returned transform is an affinity.
|
* mode is no isometry. In that case, the returned transform is an affinity.
|
||||||
*/
|
*/
|
||||||
template<typename DiagonalDerived>
|
template<typename DiagonalDerived>
|
||||||
friend inline const Transform<Scalar,Dim,((Mode==(int)Isometry)?Affine:(int)Mode)>
|
friend inline TransformTimeDiagonalReturnType
|
||||||
operator * (const DiagonalBase<DiagonalDerived> &a, const Transform &b)
|
operator * (const DiagonalBase<DiagonalDerived> &a, const Transform &b)
|
||||||
{
|
{
|
||||||
Transform<Scalar,Dim,((Mode==(int)Isometry)?Affine:(int)Mode)> res;
|
TransformTimeDiagonalReturnType res;
|
||||||
res.linear().noalias() = a*b.linear();
|
res.linear().noalias() = a*b.linear();
|
||||||
res.translation().noalias() = a*b.translation();
|
res.translation().noalias() = a*b.translation();
|
||||||
if (Mode!=int(AffineCompact))
|
if (Mode!=int(AffineCompact))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user