From 3b8434c8b232e39071a3b118db35b4528f354d38 Mon Sep 17 00:00:00 2001
From: Steve Tonneau <stonneau@laas.fr>
Date: Thu, 24 Nov 2016 15:31:49 +0100
Subject: [PATCH] dim is now positive, added headers to test cmakelists

---
 include/spline/bezier_curve.h                | 2 +-
 include/spline/cubic_function.h              | 2 +-
 include/spline/curve_abc.h                   | 2 +-
 include/spline/exact_cubic.h                 | 2 +-
 include/spline/optimization/OptimizeSpline.h | 6 +++---
 src/tests/spline_test/CMakeLists.txt         | 4 +++-
 6 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/include/spline/bezier_curve.h b/include/spline/bezier_curve.h
index 85b06a7..afac9bc 100644
--- a/include/spline/bezier_curve.h
+++ b/include/spline/bezier_curve.h
@@ -21,7 +21,7 @@ namespace spline
 /// \class BezierCurve
 /// \brief Represents a curve
 ///
-template<typename Time= double, typename Numeric=Time, int Dim=3, bool Safe=false
+template<typename Time= double, typename Numeric=Time, std::size_t Dim=3, bool Safe=false
 , typename Point= Eigen::Matrix<Numeric, Dim, 1> >
 struct bezier_curve : public  curve_abc<Time, Numeric, Dim, Safe, Point>
 {
diff --git a/include/spline/cubic_function.h b/include/spline/cubic_function.h
index c5acdf6..6fdc590 100644
--- a/include/spline/cubic_function.h
+++ b/include/spline/cubic_function.h
@@ -27,7 +27,7 @@ namespace spline
 /// [tBegin, tEnd]. It follows the equation
 /// x(t) = a + b(t - t_min_) + c(t - t_min_)^2 + d(t - t_min_)^3 
 ///
-template<typename Time= double, typename Numeric=Time, int Dim=3, bool Safe=false
+template<typename Time= double, typename Numeric=Time, std::size_t Dim=3, bool Safe=false
 , typename Point= Eigen::Matrix<Numeric, Dim, 1> >
 struct cubic_function : public curve_abc<Time, Numeric, Dim, Safe, Point>
 {
diff --git a/include/spline/curve_abc.h b/include/spline/curve_abc.h
index da3874d..8aedfec 100644
--- a/include/spline/curve_abc.h
+++ b/include/spline/curve_abc.h
@@ -21,7 +21,7 @@ namespace spline
 /// \struct curve_abc
 /// \brief Represents a curve of dimension Dim
 /// is Safe is false, no verification is made on the evaluation of the curve.
-template<typename Time= double, typename Numeric=Time, int Dim=3, bool Safe=false
+template<typename Time= double, typename Numeric=Time, std::size_t Dim=3, bool Safe=false
 , typename Point= Eigen::Matrix<Numeric, Dim, 1> >
 struct  curve_abc : std::unary_function<Time, Point>
 {
diff --git a/include/spline/exact_cubic.h b/include/spline/exact_cubic.h
index 9cba9d4..8c42502 100644
--- a/include/spline/exact_cubic.h
+++ b/include/spline/exact_cubic.h
@@ -34,7 +34,7 @@ namespace spline
 /// \brief Represents a set of cubic splines defining a continuous function 
 /// crossing each of the waypoint given in its initialization
 ///
-template<typename Time= double, typename Numeric=Time, int Dim=3, bool Safe=false
+template<typename Time= double, typename Numeric=Time, std::size_t Dim=3, bool Safe=false
 , typename Point= Eigen::Matrix<Numeric, Dim, 1> >
 struct exact_cubic : public curve_abc<Time, Numeric, Dim, Safe, Point>
 {
diff --git a/include/spline/optimization/OptimizeSpline.h b/include/spline/optimization/OptimizeSpline.h
index 15f05ab..a5425b1 100644
--- a/include/spline/optimization/OptimizeSpline.h
+++ b/include/spline/optimization/OptimizeSpline.h
@@ -24,7 +24,7 @@ namespace spline
 {
 /// \class SplineOptimizer
 /// \brief Mosek connection to produce optimized splines
-template<typename Time= double, typename Numeric=Time, int Dim=3, bool Safe=false
+template<typename Time= double, typename Numeric=Time, std::size_t Dim=3, bool Safe=false
 , typename Point= Eigen::Matrix<Numeric, Dim, 1> >
 struct SplineOptimizer
 {
@@ -79,7 +79,7 @@ private:
 	typedef std::vector<waypoint_t> T_waypoints_t; 
 };
 
-template<typename Time, typename Numeric, int Dim, bool Safe, typename Point>
+template<typename Time, typename Numeric, std::size_t Dim, bool Safe, typename Point>
 template<typename In>
 inline void SplineOptimizer<Time, Numeric, Dim, Safe, Point>::ComputeHMatrices(In wayPointsBegin, In wayPointsEnd, 
 	MatrixX& h1, MatrixX& h2, MatrixX& h3, MatrixX& h4) const
@@ -116,7 +116,7 @@ inline void SplineOptimizer<Time, Numeric, Dim, Safe, Point>::ComputeHMatrices(I
 	}
 }
 
-template<typename Time, typename Numeric, int Dim, bool Safe, typename Point>
+template<typename Time, typename Numeric, std::size_t Dim, bool Safe, typename Point>
 template<typename In>
 inline exact_cubic<Time, Numeric, Dim, Safe, Point>*
 	SplineOptimizer<Time, Numeric, Dim, Safe, Point>::GenerateOptimizedCurve(In wayPointsBegin, In wayPointsEnd) const
diff --git a/src/tests/spline_test/CMakeLists.txt b/src/tests/spline_test/CMakeLists.txt
index aaf8944..874c7e3 100644
--- a/src/tests/spline_test/CMakeLists.txt
+++ b/src/tests/spline_test/CMakeLists.txt
@@ -2,7 +2,9 @@ cmake_minimum_required(VERSION 2.6)
 
 include_directories("${PROJECT_SOURCE_DIR}/include")
 
+FILE(GLOB_RECURSE HeaderFiles "${PROJECT_SOURCE_DIR}/include/spline/*.h")
+
 add_executable(
-        spline_tests Main.cpp
+				spline_tests ${HeaderFiles} Main.cpp
 )
 
-- 
GitLab