From cf5c5ed72526101ea33dc9f34f7ad1375119603e Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Fri, 21 Jun 2013 09:27:38 +0200 Subject: [PATCH] Fix warning typedef XXX locally defined but not used --- test/special_numbers.cpp | 1 - unsupported/Eigen/src/Splines/Spline.h | 5 ----- unsupported/Eigen/src/Splines/SplineFitting.h | 3 --- unsupported/test/matrix_power.cpp | 8 ++++---- unsupported/test/polynomialsolver.cpp | 3 --- unsupported/test/sparse_extra.cpp | 1 - 6 files changed, 4 insertions(+), 17 deletions(-) diff --git a/test/special_numbers.cpp b/test/special_numbers.cpp index a5936184e..b5c83af8b 100644 --- a/test/special_numbers.cpp +++ b/test/special_numbers.cpp @@ -11,7 +11,6 @@ template void special_numbers() { - typedef typename NumTraits::Real RealScalar; typedef Matrix MatType; int rows = internal::random(1,300); int cols = internal::random(1,300); diff --git a/unsupported/Eigen/src/Splines/Spline.h b/unsupported/Eigen/src/Splines/Spline.h index 1093dfe05..771f10432 100644 --- a/unsupported/Eigen/src/Splines/Spline.h +++ b/unsupported/Eigen/src/Splines/Spline.h @@ -295,11 +295,7 @@ namespace Eigen enum { Order = SplineTraits::OrderAtCompileTime }; enum { DerivativeOrder = DerivativeType::ColsAtCompileTime }; - typedef typename SplineTraits::Scalar Scalar; - - typedef typename SplineTraits::BasisVectorType BasisVectorType; typedef typename SplineTraits::ControlPointVectorType ControlPointVectorType; - typedef typename SplineTraits::BasisDerivativeType BasisDerivativeType; typedef typename BasisDerivativeType::ConstRowXpr BasisDerivativeRowXpr; @@ -358,7 +354,6 @@ namespace Eigen typedef typename SplineTraits::Scalar Scalar; typedef typename SplineTraits::BasisVectorType BasisVectorType; typedef typename SplineTraits::KnotVectorType KnotVectorType; - typedef typename SplineTraits::ControlPointVectorType ControlPointVectorType; const KnotVectorType& U = spline.knots(); diff --git a/unsupported/Eigen/src/Splines/SplineFitting.h b/unsupported/Eigen/src/Splines/SplineFitting.h index 1b566332f..0265d532c 100644 --- a/unsupported/Eigen/src/Splines/SplineFitting.h +++ b/unsupported/Eigen/src/Splines/SplineFitting.h @@ -40,8 +40,6 @@ namespace Eigen template void KnotAveraging(const KnotVectorType& parameters, DenseIndex degree, KnotVectorType& knots) { - typedef typename KnotVectorType::Scalar Scalar; - knots.resize(parameters.size()+degree+1); for (DenseIndex j=1; j::Interpolate(const PointArrayType& pts, DenseIndex degree, const KnotVectorType& knot_parameters) { typedef typename SplineType::KnotVectorType::Scalar Scalar; - typedef typename SplineType::BasisVectorType BasisVectorType; typedef typename SplineType::ControlPointVectorType ControlPointVectorType; typedef Matrix MatrixType; diff --git a/unsupported/test/matrix_power.cpp b/unsupported/test/matrix_power.cpp index 2763b97cc..39d5bf7cc 100644 --- a/unsupported/test/matrix_power.cpp +++ b/unsupported/test/matrix_power.cpp @@ -161,12 +161,12 @@ void testMatrixVector(const MatrixType& m, const VectorType& v, double tol) testTriangularProduct(m,v,tol); } +typedef Matrix Matrix3dRowMajor; +typedef Matrix MatrixXe; +typedef Matrix VectorXe; + void test_matrix_power() { - typedef Matrix Matrix3dRowMajor; - typedef Matrix MatrixXe; - typedef Matrix VectorXe; - CALL_SUBTEST_2(test2dRotation(1e-13)); CALL_SUBTEST_1(test2dRotation(2e-5)); // was 1e-5, relaxed for clang 2.8 / linux / x86-64 CALL_SUBTEST_9(test2dRotation(1e-13)); diff --git a/unsupported/test/polynomialsolver.cpp b/unsupported/test/polynomialsolver.cpp index c31104f14..13f92169e 100644 --- a/unsupported/test/polynomialsolver.cpp +++ b/unsupported/test/polynomialsolver.cpp @@ -106,10 +106,7 @@ void evalSolverSugarFunction( const POLYNOMIAL& pols, const ROOTS& roots, const typedef typename POLYNOMIAL::Scalar Scalar; typedef typename REAL_ROOTS::Scalar Real; - typedef PolynomialSolver PolynomialSolverType; - typedef typename PolynomialSolverType::RootsType RootsType; - typedef Matrix EvalRootsType; //Test realRoots std::vector< Real > calc_realRoots; diff --git a/unsupported/test/sparse_extra.cpp b/unsupported/test/sparse_extra.cpp index 5dc333424..1ee791b0f 100644 --- a/unsupported/test/sparse_extra.cpp +++ b/unsupported/test/sparse_extra.cpp @@ -17,7 +17,6 @@ template bool test_random_setter(SparseMatrix& sm, const DenseType& ref, const std::vector& nonzeroCoords) { - typedef SparseMatrix SparseType; { sm.setZero(); SetterType w(sm);