From: Anthony Geay Date: Fri, 31 Aug 2018 09:04:33 +0000 (+0200) Subject: Last cleanup X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=798e8ee22e6a8f80e29b0dab889f5eef61b2234f;p=tools%2Fmedcoupling.git Last cleanup --- diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.cxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.cxx index 03ae45f56..db8f43d67 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.cxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.cxx @@ -28,9 +28,7 @@ #include -#ifdef WIN32 #include -#endif using namespace INTERP_KERNEL; diff --git a/src/INTERP_KERNEL/InterpKernelCellSimplify.cxx b/src/INTERP_KERNEL/InterpKernelCellSimplify.cxx index 761c1595c..ebc88f280 100644 --- a/src/INTERP_KERNEL/InterpKernelCellSimplify.cxx +++ b/src/INTERP_KERNEL/InterpKernelCellSimplify.cxx @@ -21,6 +21,7 @@ #include "InterpKernelCellSimplify.hxx" #include "CellModel.hxx" +#include #include #include #include @@ -31,10 +32,6 @@ #include #include -#ifdef WIN32 -#include -#endif - using namespace INTERP_KERNEL; /*! diff --git a/src/MEDCoupling/MEDCouplingMemArray.hxx b/src/MEDCoupling/MEDCouplingMemArray.hxx index 4ee8a3d7e..8d877f7dc 100644 --- a/src/MEDCoupling/MEDCouplingMemArray.hxx +++ b/src/MEDCoupling/MEDCouplingMemArray.hxx @@ -51,14 +51,14 @@ namespace MEDCoupling class MEDCouplingPointer { public: - MEDCOUPLING_EXPORT MEDCouplingPointer():_internal(0),_external(0) { } - MEDCOUPLING_EXPORT void null() { _internal=0; _external=0; } - MEDCOUPLING_EXPORT bool isNull() const { return _internal==0 && _external==0; } - MEDCOUPLING_EXPORT void setInternal(T *pointer); - MEDCOUPLING_EXPORT void setExternal(const T *pointer); - MEDCOUPLING_EXPORT const T *getConstPointer() const { if(_internal) return _internal; else return _external; } - MEDCOUPLING_EXPORT const T *getConstPointerLoc(std::size_t offset) const { if(_internal) return _internal+offset; else return _external+offset; } - MEDCOUPLING_EXPORT T *getPointer() { if(_internal) return _internal; if(_external) throw INTERP_KERNEL::Exception("Trying to write on an external pointer."); else return 0; } + MEDCOUPLING_EXPORT MEDCouplingPointer():_internal(0),_external(0) { } + MEDCOUPLING_EXPORT void null() { _internal=0; _external=0; } + MEDCOUPLING_EXPORT bool isNull() const { return _internal==0 && _external==0; } + MEDCOUPLING_EXPORT void setInternal(T *pointer); + MEDCOUPLING_EXPORT void setExternal(const T *pointer); + MEDCOUPLING_EXPORT const T *getConstPointer() const { if(_internal) return _internal; else return _external; } + MEDCOUPLING_EXPORT const T *getConstPointerLoc(std::size_t offset) const { if(_internal) return _internal+offset; else return _external+offset; } + MEDCOUPLING_EXPORT T *getPointer() { if(_internal) return _internal; if(_external) throw INTERP_KERNEL::Exception("Trying to write on an external pointer."); else return 0; } private: T *_internal; const T *_external; @@ -71,44 +71,44 @@ namespace MEDCoupling typedef void (*Deallocator)(void *,void *); public: MEDCOUPLING_EXPORT MemArray():_nb_of_elem(0),_nb_of_elem_alloc(0),_ownership(false),_dealloc(0),_param_for_deallocator(0) { } - MEDCOUPLING_EXPORT MemArray(const MemArray& other); - MEDCOUPLING_EXPORT bool isNull() const { return _pointer.isNull(); } - MEDCOUPLING_EXPORT const T *getConstPointerLoc(std::size_t offset) const { return _pointer.getConstPointerLoc(offset); } - MEDCOUPLING_EXPORT const T *getConstPointer() const { return _pointer.getConstPointer(); } - MEDCOUPLING_EXPORT std::size_t getNbOfElem() const { return _nb_of_elem; } - MEDCOUPLING_EXPORT std::size_t getNbOfElemAllocated() const { return _nb_of_elem_alloc; } - MEDCOUPLING_EXPORT T *getPointer() { return _pointer.getPointer(); } - MEDCOUPLING_EXPORT MemArray &operator=(const MemArray& other); - MEDCOUPLING_EXPORT T operator[](std::size_t id) const { return _pointer.getConstPointer()[id]; } - MEDCOUPLING_EXPORT T& operator[](std::size_t id) { return _pointer.getPointer()[id]; } - MEDCOUPLING_EXPORT bool isEqual(const MemArray& other, T prec, std::string& reason) const; - MEDCOUPLING_EXPORT void repr(int sl, std::ostream& stream) const; - MEDCOUPLING_EXPORT bool reprHeader(int sl, std::ostream& stream) const; - MEDCOUPLING_EXPORT void reprZip(int sl, std::ostream& stream) const; - MEDCOUPLING_EXPORT void reprNotTooLong(int sl, std::ostream& stream) const; - MEDCOUPLING_EXPORT void fillWithValue(const T& val); - MEDCOUPLING_EXPORT T *fromNoInterlace(int nbOfComp) const; - MEDCOUPLING_EXPORT T *toNoInterlace(int nbOfComp) const; - MEDCOUPLING_EXPORT void sort(bool asc); - MEDCOUPLING_EXPORT void reverse(int nbOfComp); - MEDCOUPLING_EXPORT void alloc(std::size_t nbOfElements); - MEDCOUPLING_EXPORT void reserve(std::size_t newNbOfElements); - MEDCOUPLING_EXPORT void reAlloc(std::size_t newNbOfElements); - MEDCOUPLING_EXPORT void useArray(const T *array, bool ownership, DeallocType type, std::size_t nbOfElem); - MEDCOUPLING_EXPORT void useExternalArrayWithRWAccess(const T *array, std::size_t nbOfElem); - MEDCOUPLING_EXPORT void writeOnPlace(std::size_t id, T element0, const T *others, std::size_t sizeOfOthers); + MEDCOUPLING_EXPORT MemArray(const MemArray& other); + MEDCOUPLING_EXPORT bool isNull() const { return _pointer.isNull(); } + MEDCOUPLING_EXPORT const T *getConstPointerLoc(std::size_t offset) const { return _pointer.getConstPointerLoc(offset); } + MEDCOUPLING_EXPORT const T *getConstPointer() const { return _pointer.getConstPointer(); } + MEDCOUPLING_EXPORT std::size_t getNbOfElem() const { return _nb_of_elem; } + MEDCOUPLING_EXPORT std::size_t getNbOfElemAllocated() const { return _nb_of_elem_alloc; } + MEDCOUPLING_EXPORT T *getPointer() { return _pointer.getPointer(); } + MEDCOUPLING_EXPORT MemArray &operator=(const MemArray& other); + MEDCOUPLING_EXPORT T operator[](std::size_t id) const { return _pointer.getConstPointer()[id]; } + MEDCOUPLING_EXPORT T& operator[](std::size_t id) { return _pointer.getPointer()[id]; } + MEDCOUPLING_EXPORT bool isEqual(const MemArray& other, T prec, std::string& reason) const; + MEDCOUPLING_EXPORT void repr(int sl, std::ostream& stream) const; + MEDCOUPLING_EXPORT bool reprHeader(int sl, std::ostream& stream) const; + MEDCOUPLING_EXPORT void reprZip(int sl, std::ostream& stream) const; + MEDCOUPLING_EXPORT void reprNotTooLong(int sl, std::ostream& stream) const; + MEDCOUPLING_EXPORT void fillWithValue(const T& val); + MEDCOUPLING_EXPORT T *fromNoInterlace(int nbOfComp) const; + MEDCOUPLING_EXPORT T *toNoInterlace(int nbOfComp) const; + MEDCOUPLING_EXPORT void sort(bool asc); + MEDCOUPLING_EXPORT void reverse(int nbOfComp); + MEDCOUPLING_EXPORT void alloc(std::size_t nbOfElements); + MEDCOUPLING_EXPORT void reserve(std::size_t newNbOfElements); + MEDCOUPLING_EXPORT void reAlloc(std::size_t newNbOfElements); + MEDCOUPLING_EXPORT void useArray(const T *array, bool ownership, DeallocType type, std::size_t nbOfElem); + MEDCOUPLING_EXPORT void useExternalArrayWithRWAccess(const T *array, std::size_t nbOfElem); + MEDCOUPLING_EXPORT void writeOnPlace(std::size_t id, T element0, const T *others, std::size_t sizeOfOthers); template void insertAtTheEnd(InputIterator first, InputIterator last); - MEDCOUPLING_EXPORT void pushBack(T elem); - MEDCOUPLING_EXPORT T popBack(); - MEDCOUPLING_EXPORT void pack() const; - MEDCOUPLING_EXPORT bool isDeallocatorCalled() const { return _ownership; } - MEDCOUPLING_EXPORT Deallocator getDeallocator() const { return _dealloc; } - MEDCOUPLING_EXPORT void setSpecificDeallocator(Deallocator dealloc) { _dealloc=dealloc; } - MEDCOUPLING_EXPORT void setParameterForDeallocator(void *param) { _param_for_deallocator=param; } - MEDCOUPLING_EXPORT void *getParameterForDeallocator() const { return _param_for_deallocator; } - MEDCOUPLING_EXPORT void destroy(); - MEDCOUPLING_EXPORT ~MemArray() { destroy(); } + MEDCOUPLING_EXPORT void pushBack(T elem); + MEDCOUPLING_EXPORT T popBack(); + MEDCOUPLING_EXPORT void pack() const; + MEDCOUPLING_EXPORT bool isDeallocatorCalled() const { return _ownership; } + MEDCOUPLING_EXPORT Deallocator getDeallocator() const { return _dealloc; } + MEDCOUPLING_EXPORT void setSpecificDeallocator(Deallocator dealloc) { _dealloc=dealloc; } + MEDCOUPLING_EXPORT void setParameterForDeallocator(void *param) { _param_for_deallocator=param; } + MEDCOUPLING_EXPORT void *getParameterForDeallocator() const { return _param_for_deallocator; } + MEDCOUPLING_EXPORT void destroy(); + MEDCOUPLING_EXPORT ~MemArray() { destroy(); } public: static void CPPDeallocator(void *pt, void *param); static void CDeallocator(void *pt, void *param); diff --git a/src/MEDCoupling/MEDCouplingPartDefinition.cxx b/src/MEDCoupling/MEDCouplingPartDefinition.cxx index 6d5c92ad0..3f1ba3f42 100644 --- a/src/MEDCoupling/MEDCouplingPartDefinition.cxx +++ b/src/MEDCoupling/MEDCouplingPartDefinition.cxx @@ -20,11 +20,8 @@ #include "MEDCouplingPartDefinition.hxx" -#include - -#ifdef WIN32 #include -#endif +#include using namespace MEDCoupling; diff --git a/src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx b/src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx index 94d59ecea..7b572ab07 100644 --- a/src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx +++ b/src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx @@ -23,7 +23,7 @@ #include "MEDCouplingCMesh.hxx" #include "MEDCouplingMappedExtrudedMesh.hxx" #include "MEDCouplingFieldDouble.hxx" -#include "MEDCouplingMemArray.hxx" +#include "MEDCouplingMemArray.txx" #include #include diff --git a/src/MEDCoupling_Swig/MEDCouplingCommon.i b/src/MEDCoupling_Swig/MEDCouplingCommon.i index 9a94201a1..3335069fa 100644 --- a/src/MEDCoupling_Swig/MEDCouplingCommon.i +++ b/src/MEDCoupling_Swig/MEDCouplingCommon.i @@ -31,9 +31,7 @@ #include "MEDCouplingMappedExtrudedMesh.hxx" #include "MEDCouplingCMesh.hxx" #include "MEDCouplingIMesh.hxx" -#ifdef WIN32 #include "MEDCouplingMap.txx" -#endif #include "MEDCouplingCurveLinearMesh.hxx" #include "MEDCoupling1GTUMesh.hxx" #include "MEDCouplingField.hxx" diff --git a/src/PyWrapping/medcoupling.i b/src/PyWrapping/medcoupling.i index 3e3abc7cc..c97318d5b 100644 --- a/src/PyWrapping/medcoupling.i +++ b/src/PyWrapping/medcoupling.i @@ -21,12 +21,6 @@ %module medcoupling -%{ -#ifdef WIN32 -#include "MEDCouplingMap.txx" -#endif -%} - #define MEDCOUPLINGREMAPPER_EXPORT #define INTERPKERNEL_EXPORT #define MEDCOUPLING_EXPORT diff --git a/src/RENUMBER_Swig/MEDRenumber.i b/src/RENUMBER_Swig/MEDRenumber.i index e2c08fbff..5c6a3646f 100644 --- a/src/RENUMBER_Swig/MEDRenumber.i +++ b/src/RENUMBER_Swig/MEDRenumber.i @@ -19,7 +19,6 @@ %module MEDRenumber -%include "MEDCouplingCommon.i" %include "MEDRenumberCommon.i" %pythoncode %{