From: Camille GOUTTEBROZE Date: Thu, 17 Apr 2014 09:58:59 +0000 (+0200) Subject: Fix for MSVC2010 X-Git-Tag: V7_4_0rc1~23 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=09e4b5b38eb23f456aa54360421cd54f4e832725;p=modules%2Fmed.git Fix for MSVC2010 --- diff --git a/src/MEDCoupling_Swig/MEDCouplingDataArrayTypemaps.i b/src/MEDCoupling_Swig/MEDCouplingDataArrayTypemaps.i index 46527b823..01df00d9c 100644 --- a/src/MEDCoupling_Swig/MEDCouplingDataArrayTypemaps.i +++ b/src/MEDCoupling_Swig/MEDCouplingDataArrayTypemaps.i @@ -318,7 +318,7 @@ MCData *BuildNewInstance(PyObject *elt0, int npyObjectType, PyTypeObject *pytype ret->useArray(reinterpret_cast(data),true,ParaMEDMEM::C_DEALLOC,sz0,sz1); PyObject *ref=PyWeakref_NewRef(reinterpret_cast(eltOwning),NULL); typename ParaMEDMEM::MemArray::Deallocator tmp(ParaMEDMEM::MemArray::CDeallocator); - void **tmp2(reinterpret_cast(&tmp)); + void **tmp2 = reinterpret_cast(&tmp); // MSVC2010 does not support constructor() void **objs=new void *[2]; objs[0]=ref; objs[1]=*tmp2; mma.setParameterForDeallocator(objs); mma.setSpecificDeallocator(numarrdeal); @@ -424,7 +424,7 @@ PyObject *ToNumPyArray(MCData *self, int npyObjectType, const char *MCDataStr) {// case for the first call of toNumPyArray PyObject *ref(PyWeakref_NewRef(ret,NULL)); typename ParaMEDMEM::MemArray::Deallocator tmp(mem.getDeallocator()); - void **tmp2(reinterpret_cast(&tmp)); + void **tmp2 = reinterpret_cast(&tmp); // MSVC2010 does not support constructor() void **objs=new void *[2]; objs[0]=reinterpret_cast(ref); objs[1]=*tmp2; mem.setParameterForDeallocator(objs); mem.setSpecificDeallocator(numarrdeal);