X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3f391af133151d7ed0125a4fbcfaf6f68a5df2c6..399e4077a352ec6e0ad4134e5645a29d0d241c88:/src/surf/cpu_ti.cpp diff --git a/src/surf/cpu_ti.cpp b/src/surf/cpu_ti.cpp index e4b500a28b..e312e6e657 100644 --- a/src/surf/cpu_ti.cpp +++ b/src/surf/cpu_ti.cpp @@ -410,7 +410,7 @@ CpuTiModel::~CpuTiModel() xbt_lib_foreach(host_lib, cursor, key, cpu){ if(cpu[SURF_CPU_LEVEL]) { - CpuTiPtr CPU = (CpuTiPtr) cpu[SURF_CPU_LEVEL]; + CpuTiPtr CPU = dynamic_cast(static_cast(cpu[SURF_CPU_LEVEL])); xbt_swag_free(CPU->p_actionSet); delete CPU->p_availTrace; } @@ -456,7 +456,7 @@ CpuTiPtr CpuTiModel::createResource(const char *name, name); CpuTiPtr cpu = new CpuTi(this, name, powerPeak, powerScale, powerTrace, core, stateInitial, stateTrace, cpuProperties); - xbt_lib_set(host_lib, name, SURF_CPU_LEVEL, cpu); + xbt_lib_set(host_lib, name, SURF_CPU_LEVEL, static_cast(cpu)); return (CpuTiPtr) xbt_lib_get_elm_or_null(host_lib, name); }