Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill (hopefully) dead code
authorMartin Quinson <martin.quinson@loria.fr>
Sun, 2 Oct 2016 13:25:43 +0000 (15:25 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sun, 2 Oct 2016 13:25:43 +0000 (15:25 +0200)
src/surf/cpu_interface.cpp
src/surf/cpu_interface.hpp

index a90e142..9f8e4bf 100644 (file)
@@ -20,22 +20,15 @@ simgrid::surf::CpuModel *surf_cpu_model_vm;
 namespace simgrid {
 namespace surf {
 
-/*************
- * Callbacks *
- *************/
-
-simgrid::xbt::signal<void(CpuAction*, Action::State, Action::State)> cpuActionStateChangedCallbacks;
-
 /*********
  * Model *
  *********/
 
-CpuModel::~CpuModel() = default;
-
 void CpuModel::updateActionsStateLazy(double now, double /*delta*/)
 {
   while ((xbt_heap_size(getActionHeap()) > 0)
          && (double_equals(xbt_heap_maxkey(getActionHeap()), now, sg_surf_precision))) {
+
     CpuAction *action = static_cast<CpuAction*>(xbt_heap_pop(getActionHeap()));
     XBT_CDEBUG(surf_kernel, "Something happened to action %p", action);
     if (TRACE_is_enabled()) {
@@ -52,7 +45,6 @@ void CpuModel::updateActionsStateLazy(double now, double /*delta*/)
     /* set the remains to 0 due to precision problems when updating the remaining amount */
     action->setRemains(0);
     action->setState(Action::State::done);
-    action->heapRemove(getActionHeap()); //FIXME: strange call since action was already popped
   }
   if (TRACE_is_enabled()) {
     //defining the last timestamp that we can safely dump to trace file
index 5823a71..790e61c 100644 (file)
@@ -38,7 +38,7 @@ class CpuAction;
 XBT_PUBLIC_CLASS CpuModel : public Model {
 public:
   CpuModel() : Model() {};
-  ~CpuModel() override;
+  ~CpuModel() = default;
 
   /**
    * @brief Create a Cpu