From 88560e80486f28d13b089277cd7f53e8e2b5fe01 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Wed, 26 May 2010 16:31:52 +0200 Subject: [PATCH] robofsm: Remove unnecessary new/delete pair --- src/robofsm/common-states.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/robofsm/common-states.cc b/src/robofsm/common-states.cc index afc2b0d3..e68298a1 100644 --- a/src/robofsm/common-states.cc +++ b/src/robofsm/common-states.cc @@ -101,9 +101,7 @@ FSM_STATE(approach_the_slope) { switch(FSM_EVENT) { case EV_ENTRY: { - struct slope_approach_style *p = (struct slope_approach_style *) FSM_EVENT_PTR; - slope_approach_style_p = new slope_approach_style(*p); // use copy constructor - delete(p); // delete given data + slope_approach_style_p = (struct slope_approach_style *) FSM_EVENT_PTR; if (slope_approach_style_p == NULL) { printf("it is not allowed to call the approach_the_slope state with NULL data\n!"); #warning remove the next line -- 2.39.2