Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics: init fields at declaration, emptying the ctor
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 24 Mar 2018 09:36:54 +0000 (10:36 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 24 Mar 2018 09:36:54 +0000 (10:36 +0100)
include/simgrid/kernel/resource/Model.hpp
src/kernel/resource/Model.cpp

index eb4b017..3478fee 100644 (file)
@@ -94,15 +94,15 @@ public:
   virtual bool nextOccuringEventIsIdempotent() { return true; }
 
 protected:
-  ActionLmmListPtr modifiedSet_;
+  ActionLmmListPtr modifiedSet_ = nullptr;
   lmm_system_t maxminSystem_ = nullptr;
 
 private:
   e_UM_t updateMechanism_ = UM_UNDEFINED;
-  ActionList* readyActionSet_;   /**< Actions in state SURF_ACTION_READY */
-  ActionList* runningActionSet_; /**< Actions in state SURF_ACTION_RUNNING */
-  ActionList* failedActionSet_ /**< Actions in state SURF_ACTION_FAILED */
-  ActionList* doneActionSet_;    /**< Actions in state SURF_ACTION_DONE */
+  ActionList* readyActionSet_   = new ActionList(); /**< Actions in state SURF_ACTION_READY */
+  ActionList* runningActionSet_ = new ActionList(); /**< Actions in state SURF_ACTION_RUNNING */
+  ActionList* failedActionSet_  = new ActionList(); /**< Actions in state SURF_ACTION_FAILED */
+  ActionList* doneActionSet_    = new ActionList(); /**< Actions in state SURF_ACTION_DONE */
   heap_type actionHeap_;
 };
 
index 2d70b7e..54b0392 100644 (file)
@@ -12,16 +12,7 @@ namespace simgrid {
 namespace kernel {
 namespace resource {
 
-Model::Model() : maxminSystem_(nullptr)
-{
-  readyActionSet_   = new ActionList();
-  runningActionSet_ = new ActionList();
-  failedActionSet_  = new ActionList();
-  doneActionSet_    = new ActionList();
-
-  modifiedSet_     = nullptr;
-  updateMechanism_ = UM_UNDEFINED;
-}
+Model::Model() = default;
 
 Model::~Model()
 {