]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
Fix for MSVC2010
authorCamille GOUTTEBROZE <camille.gouttebroze@cea.fr>
Thu, 17 Apr 2014 09:58:59 +0000 (11:58 +0200)
committerCamille GOUTTEBROZE <camille.gouttebroze@cea.fr>
Thu, 17 Apr 2014 09:58:59 +0000 (11:58 +0200)
src/MEDCoupling_Swig/MEDCouplingDataArrayTypemaps.i

index 46527b8234a74a66a00224005d5e310acace7e53..01df00d9c92d0844e51f7511e74e98eab22231b5 100644 (file)
@@ -318,7 +318,7 @@ MCData *BuildNewInstance(PyObject *elt0, int npyObjectType, PyTypeObject *pytype
           ret->useArray(reinterpret_cast<const T *>(data),true,ParaMEDMEM::C_DEALLOC,sz0,sz1);
           PyObject *ref=PyWeakref_NewRef(reinterpret_cast<PyObject *>(eltOwning),NULL);
           typename ParaMEDMEM::MemArray<T>::Deallocator tmp(ParaMEDMEM::MemArray<T>::CDeallocator);
-          void **tmp2(reinterpret_cast<void**>(&tmp));
+          void **tmp2 = reinterpret_cast<void**>(&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<T>::Deallocator tmp(mem.getDeallocator());
-          void **tmp2(reinterpret_cast<void**>(&tmp));
+          void **tmp2 = reinterpret_cast<void**>(&tmp); // MSVC2010 does not support constructor()
           void **objs=new void *[2]; objs[0]=reinterpret_cast<void*>(ref); objs[1]=*tmp2;
           mem.setParameterForDeallocator(objs);
           mem.setSpecificDeallocator(numarrdeal);