Added a missing inline hints.

Removed a useless Nested temporary.
This commit is contained in:
Hauke Heibel 2010-03-03 15:24:58 +01:00
parent b0ffd9bf04
commit aa6570c3a3
2 changed files with 3 additions and 4 deletions

View File

@ -69,7 +69,7 @@ template<typename Derived> struct ei_determinant_impl<Derived, 2>
template<typename Derived> struct ei_determinant_impl<Derived, 3>
{
static typename ei_traits<Derived>::Scalar run(const Derived& m)
static inline typename ei_traits<Derived>::Scalar run(const Derived& m)
{
return ei_bruteforce_det3_helper(m,0,1,2)
- ei_bruteforce_det3_helper(m,1,0,2)
@ -100,8 +100,7 @@ inline typename ei_traits<Derived>::Scalar MatrixBase<Derived>::determinant() co
{
assert(rows() == cols());
typedef typename ei_nested<Derived,Base::RowsAtCompileTime>::type Nested;
Nested nested(derived());
return ei_determinant_impl<typename ei_cleantype<Nested>::type>::run(nested);
return ei_determinant_impl<typename ei_cleantype<Nested>::type>::run(derived());
}
#endif // EIGEN_DETERMINANT_H

View File

@ -123,7 +123,7 @@ struct ei_compute_inverse_and_det_with_check<MatrixType, ResultType, 2>
****************************/
template<typename MatrixType, typename ResultType>
void ei_compute_inverse_size3_helper(
inline void ei_compute_inverse_size3_helper(
const MatrixType& matrix,
const typename ResultType::Scalar& invdet,
const Matrix<typename ResultType::Scalar,3,1>& cofactors_col0,