Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Delegated constructors are a c++11 feature, avoid them.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 19 Nov 2013 07:06:29 +0000 (08:06 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 19 Nov 2013 07:06:29 +0000 (08:06 +0100)
src/surf/network.cpp
src/surf/network.hpp

index e8e886e..8fa588e 100644 (file)
@@ -248,10 +248,8 @@ void surf_network_model_init_Vegas(void)
   xbt_cfg_setdefault_double(_sg_cfg_set, "network/weight_S", 8775);
 }
 
-NetworkCm02Model::NetworkCm02Model() : NetworkCm02Model("network"){
-}
-
-NetworkCm02Model::NetworkCm02Model(string name) : Model(name){
+void NetworkCm02Model::initialize()
+{
   ActionLmmPtr comm;
 
   char *optim = xbt_cfg_get_string(_sg_cfg_set, "network/optim");
index 9770099..62ae4e4 100644 (file)
@@ -35,13 +35,19 @@ void net_define_callbacks(void);
  * Model *
  *********/
 class NetworkCm02Model : public Model {
+private:
+  void initialize();
 public:
   NetworkCm02Model(int i) : Model("network") {
        f_networkSolve = lmm_solve;
        m_haveGap = false;
   };//FIXME: add network clean interface
-  NetworkCm02Model(string name);
-  NetworkCm02Model();
+  NetworkCm02Model(string name) : Model(name) {
+    this->initialize();
+  }
+  NetworkCm02Model() : Model("network") {
+    this->initialize();
+  }
   //FIXME:NetworkCm02LinkPtr createResource(string name);
   NetworkCm02LinkLmmPtr createResource(const char *name,
                                    double bw_initial,