Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
dynar to std::vector
[simgrid.git] / src / surf / vm_hl13.cpp
index 399d2ce..4a4d61b 100644 (file)
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_vm);
 
-void surf_vm_model_init_HL13(void){
+void surf_vm_model_init_HL13(){
   if (surf_cpu_model_vm) {
     surf_vm_model = new simgrid::surf::VMHL13Model();
-    simgrid::surf::Model *model = surf_vm_model;
-    xbt_dynar_push(all_existing_models, &model);
+    all_existing_models->push_back(surf_vm_model);
   }
 }
 
@@ -105,7 +104,7 @@ VMHL13::VMHL13(VMModel *model, const char* name, sg_host_t host_PM)
    * from the VM name, we have to make sure that the system does not call the
    * free callback for the network resource object. The network resource object
    * is still used by the physical machine. */
-  sg_host_t host_VM = sg_host_by_name_or_create(name);
+  sg_host_t host_VM = simgrid::s4u::Host::by_name_or_create(name);
   host_VM->pimpl_netcard = host_PM->pimpl_netcard;
 
   p_vm_state = SURF_VM_STATE_CREATED;