Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
initialize fields at declaration, for clarity
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 2 Dec 2015 20:56:20 +0000 (21:56 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 2 Dec 2015 20:56:20 +0000 (21:56 +0100)
src/surf/network_interface.cpp
src/surf/network_interface.hpp

index 3daac06..6ef24c4 100644 (file)
@@ -179,7 +179,6 @@ double NetworkModel::shareResourcesFull(double now)
 
 Link::Link(NetworkModel *model, const char *name, xbt_dict_t props)
 : Resource(model, name, props)
-, p_latEvent(NULL)
 {
   links->insert({name, this});
 
@@ -190,8 +189,7 @@ Link::Link(NetworkModel *model, const char *name, xbt_dict_t props,
                                 lmm_constraint_t constraint,
                             tmgr_history_t history,
                             tmgr_trace_t state_trace)
-: Resource(model, name, props, constraint),
-  p_latEvent(NULL)
+: Resource(model, name, props, constraint)
 {
   if (state_trace)
     p_stateEvent = tmgr_history_add_trace(history, state_trace, 0.0, 0, this);
index c89b7ff..ec90a5c 100644 (file)
@@ -227,8 +227,8 @@ public:
 
   /* Using this object with the public part of
     model does not make sense */
-  double m_latCurrent;
-  tmgr_trace_event_t p_latEvent;
+  double m_latCurrent = 0;
+  tmgr_trace_event_t p_latEvent = NULL;
 
   /* LMM */
   tmgr_trace_event_t p_stateEvent = NULL;