]> rtime.felk.cvut.cz Git - eurobot/public.git/blobdiff - src/robofsm/movehelper.cc
robofsm: MoveHelper - make some parameters const
[eurobot/public.git] / src / robofsm / movehelper.cc
index 38a655dccf00099216a9d54b5ae33e298ecc1f3d..3a3b4b5dea6d31d4a32b3a00cc4d082d2bc8ab8d 100644 (file)
@@ -56,7 +56,7 @@ TrajectoryConstraints trajectoryConstraintsDefault = {
  * @param tc Constrains for the trajectory.
  * @param backward Backward trajectory, implicit value false.
  */
-MoveHelper& MoveHelper::trajectory_new(TrajectoryConstraints* tc, bool backward) {
+MoveHelper& MoveHelper::trajectory_new(const TrajectoryConstraints* tc, bool backward) {
        if (!tc) tc = &trajectoryConstraintsDefault;
        if (t) delete t;
        t = new Trajectory(*tc, backward);
@@ -173,7 +173,7 @@ void MoveHelper::send_speed(double left, double right) {
  * @param heading Desired heading of the robot at goal point.
  * @param planning Use planning or not.
  */
-void MoveHelper::goto_notrans(double x, double y, move_target_heading heading, TrajectoryConstraints* tc, bool planning) {
+void MoveHelper::goto_notrans(double x, double y, move_target_heading heading, const TrajectoryConstraints* tc, bool planning) {
        move_target *target = new move_target();
        target->x = x;
        target->y = y;
@@ -192,7 +192,7 @@ void MoveHelper::goto_notrans(double x, double y, move_target_heading heading, T
  * @param heading Final heading
  * @param tc Trajectory constrains
  */
-void MoveHelper::move_by(double distance, move_target_heading heading, TrajectoryConstraints* tc) {
+void MoveHelper::move_by(double distance, move_target_heading heading, const TrajectoryConstraints* tc) {
        double x, y, phi;
 
        robot.get_est_pos(x, y, phi);