summaryrefslogtreecommitdiffhomepage
path: root/digital/io-hub
diff options
context:
space:
mode:
Diffstat (limited to 'digital/io-hub')
-rw-r--r--digital/io-hub/src/apbirthday/path_2013.cc16
-rw-r--r--digital/io-hub/src/apbirthday/path_2013.hh11
2 files changed, 13 insertions, 14 deletions
diff --git a/digital/io-hub/src/apbirthday/path_2013.cc b/digital/io-hub/src/apbirthday/path_2013.cc
index 1c5acdbe..a4597b2c 100644
--- a/digital/io-hub/src/apbirthday/path_2013.cc
+++ b/digital/io-hub/src/apbirthday/path_2013.cc
@@ -35,18 +35,10 @@ Path_2013::Path_2013() : Path( (pg_border_distance + pg_plate_size_border*2 + BO
(pg_length - pg_border_distance))
{
host_debug("Path_2013 constructor\n");
- obstacles = new path_obstacle_t[PATH_2013_OBSTACLES_NB];
- navpoints = new vect_t[PATH_2013_NAVPOINTS_NB];
- navweights = new weight_t[PATH_2013_NAVPOINTS_NB];
- astar_nodes = new struct astar_node_t[PATH_2013_NAVPOINTS_NB];
-}
-
-Path_2013::~Path_2013()
-{
- delete[] obstacles;
- delete[] navpoints;
- delete[] navweights;
- delete[] astar_nodes;
+ obstacles = obstacles_2013;
+ navpoints = navpoints_2013;
+ navweights = navweights_2013;
+ astar_nodes = astar_nodes_2013;
}
void Path_2013::reset()
diff --git a/digital/io-hub/src/apbirthday/path_2013.hh b/digital/io-hub/src/apbirthday/path_2013.hh
index 4018727d..3823ff71 100644
--- a/digital/io-hub/src/apbirthday/path_2013.hh
+++ b/digital/io-hub/src/apbirthday/path_2013.hh
@@ -33,8 +33,6 @@ class Path_2013 : public Path
public:
/** Constructor */
Path_2013();
- /** Destructor */
- ~Path_2013();
/** (overloaded) Reset path computation, remove mobile obstacles, add static obstacles */
void reset(void);
@@ -48,6 +46,15 @@ class Path_2013 : public Path
/** Number of additional navigation points. */
static const int PATH_2013_NAVPOINTS_NB =
CC_NAVPOINTS_NB + PATH_2013_CAKE_NAVPOINTS_LAYERS * PATH_2013_CAKE_NAVPOINTS_NB;
+
+ /** List of obstacles. */
+ path_obstacle_t obstacles_2013[PATH_2013_OBSTACLES_NB];
+ /** List of navigation points coordonates */
+ vect_t navpoints_2013[PATH_2013_NAVPOINTS_NB];
+ /** List of navigation points weights */
+ weight_t navweights_2013[PATH_2013_NAVPOINTS_NB];
+ /** List of nodes used for A*. */
+ struct astar_node_t astar_nodes_2013[PATH_2013_NAVPOINTS_NB];
};
#endif // path_2013_hh