X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9cca09ad88fcaeb49f2637de97df519c3920aaa4..6a8d5cf4199454b5f811043c207d195107743e72:/src/smpi/include/smpi_keyvals.hpp diff --git a/src/smpi/include/smpi_keyvals.hpp b/src/smpi/include/smpi_keyvals.hpp index bd4dd80fdf..1f8ce73a29 100644 --- a/src/smpi/include/smpi_keyvals.hpp +++ b/src/smpi/include/smpi_keyvals.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2010-2018. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -7,7 +7,6 @@ #define SMPI_KEYVALS_HPP_INCLUDED #include "smpi/smpi.h" -#include "xbt/ex.hpp" #include @@ -54,7 +53,7 @@ class Keyval{ template int Keyval::keyval_create(smpi_copy_fn copy_fn, smpi_delete_fn delete_fn, int* keyval, void* extra_state){ - smpi_key_elem value = (smpi_key_elem)xbt_new0(s_smpi_key_elem_t, 1); + smpi_key_elem value = new s_smpi_key_elem_t; value->copy_fn=copy_fn; value->delete_fn=delete_fn; @@ -75,7 +74,7 @@ template int Keyval::keyval_free(int* keyval){ } if(elem->refcount==1){ T::keyvals_.erase(*keyval); - xbt_free(elem); + delete elem; }else{ elem->refcount--; }