Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
code factorization
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 20 Jul 2015 17:01:11 +0000 (19:01 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 20 Jul 2015 17:01:11 +0000 (19:01 +0200)
src/surf/surf_interface.cpp

index e6fdd84..f49641e 100644 (file)
@@ -728,11 +728,6 @@ void Action::initialize(Model *model, double cost, bool failed,
   m_lastUpdate = 0;
   m_suspended = false;
   m_hat = NOTSET;
   m_lastUpdate = 0;
   m_suspended = false;
   m_hat = NOTSET;
-}
-
-Action::Action(Model *model, double cost, bool failed)
-{
-  initialize(model, cost, failed);
   p_category = NULL;
   p_stateHookup.prev = 0;
   p_stateHookup.next = 0;
   p_category = NULL;
   p_stateHookup.prev = 0;
   p_stateHookup.next = 0;
@@ -744,18 +739,14 @@ Action::Action(Model *model, double cost, bool failed)
   p_stateSet->push_back(*this);
 }
 
   p_stateSet->push_back(*this);
 }
 
+Action::Action(Model *model, double cost, bool failed)
+{
+  initialize(model, cost, failed);
+}
+
 Action::Action(Model *model, double cost, bool failed, lmm_variable_t var)
 {
   initialize(model, cost, failed, var);
 Action::Action(Model *model, double cost, bool failed, lmm_variable_t var)
 {
   initialize(model, cost, failed, var);
-  p_category = NULL;
-  p_stateHookup.prev = 0;
-  p_stateHookup.next = 0;
-  if (failed)
-    p_stateSet = getModel()->getFailedActionSet();
-  else
-    p_stateSet = getModel()->getRunningActionSet();
-
-  p_stateSet->push_back(*this);
 }
 
 Action::~Action() {
 }
 
 Action::~Action() {