From 09e4b5b38eb23f456aa54360421cd54f4e832725 Mon Sep 17 00:00:00 2001 From: Camille GOUTTEBROZE Date: Thu, 17 Apr 2014 11:58:59 +0200 Subject: [PATCH] Fix for MSVC2010 --- src/MEDCoupling_Swig/MEDCouplingDataArrayTypemaps.i | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.39.2