Salome HOME
projects
/
tools
/
medcoupling.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug fix: bounding box for quadratic elements spaceDim=2/meshDim=1 (i.e. SEG3)
[tools/medcoupling.git]
/
src
/
MEDCoupling
/
MEDCouplingMemArray.txx
diff --git
a/src/MEDCoupling/MEDCouplingMemArray.txx
b/src/MEDCoupling/MEDCouplingMemArray.txx
index 1eb130c25fac8f5c50f5c4e3e9818e746c1db249..3171c1672ac415a4cbc6b21f0f78d2079ffc9ac8 100644
(file)
--- a/
src/MEDCoupling/MEDCouplingMemArray.txx
+++ b/
src/MEDCoupling/MEDCouplingMemArray.txx
@@
-111,7
+111,7
@@
namespace ParaMEDMEM
}
template<class T>
}
template<class T>
- void MemArray<T>::pushBack(T elem)
throw(INTERP_KERNEL::Exception)
+ void MemArray<T>::pushBack(T elem)
{
if(_nb_of_elem>=_nb_of_elem_alloc)
reserve(_nb_of_elem_alloc>0?2*_nb_of_elem_alloc:1);
{
if(_nb_of_elem>=_nb_of_elem_alloc)
reserve(_nb_of_elem_alloc>0?2*_nb_of_elem_alloc:1);
@@
-120,7
+120,7
@@
namespace ParaMEDMEM
}
template<class T>
}
template<class T>
- T MemArray<T>::popBack()
throw(INTERP_KERNEL::Exception)
+ T MemArray<T>::popBack()
{
if(_nb_of_elem>0)
{
{
if(_nb_of_elem>0)
{
@@
-133,8
+133,7
@@
namespace ParaMEDMEM
template<class T>
void MemArray<T>::pack() const
{
template<class T>
void MemArray<T>::pack() const
{
- if(_nb_of_elem>=0)
- (const_cast<MemArray<T> * >(this))->reserve(_nb_of_elem);
+ (const_cast<MemArray<T> * >(this))->reserve(_nb_of_elem);
}
template<class T>
}
template<class T>
@@
-334,11
+333,9
@@
namespace ParaMEDMEM
}
template<class T>
}
template<class T>
- void MemArray<T>::alloc(std::size_t nbOfElements)
throw(INTERP_KERNEL::Exception)
+ void MemArray<T>::alloc(std::size_t nbOfElements)
{
destroy();
{
destroy();
- if(nbOfElements<0)
- throw INTERP_KERNEL::Exception("MemArray::alloc : request for negative length of data !");
_nb_of_elem=nbOfElements;
_nb_of_elem_alloc=nbOfElements;
_pointer.setInternal((T*)malloc(_nb_of_elem_alloc*sizeof(T)));
_nb_of_elem=nbOfElements;
_nb_of_elem_alloc=nbOfElements;
_pointer.setInternal((T*)malloc(_nb_of_elem_alloc*sizeof(T)));
@@
-356,10
+353,8
@@
namespace ParaMEDMEM
* So this method should not be confused with MemArray<T>::reserve that is close to MemArray<T>::reAlloc but not same.
*/
template<class T>
* So this method should not be confused with MemArray<T>::reserve that is close to MemArray<T>::reAlloc but not same.
*/
template<class T>
- void MemArray<T>::reserve(std::size_t newNbOfElements)
throw(INTERP_KERNEL::Exception)
+ void MemArray<T>::reserve(std::size_t newNbOfElements)
{
{
- if(newNbOfElements<0)
- throw INTERP_KERNEL::Exception("MemArray::reAlloc : request for negative length of data !");
if(_nb_of_elem_alloc==newNbOfElements)
return ;
T *pointer=(T*)malloc(newNbOfElements*sizeof(T));
if(_nb_of_elem_alloc==newNbOfElements)
return ;
T *pointer=(T*)malloc(newNbOfElements*sizeof(T));
@@
-382,10
+377,8
@@
namespace ParaMEDMEM
* So this method should not be confused with MemArray<T>::reserve that is close to MemArray<T>::reAlloc but not same.
*/
template<class T>
* So this method should not be confused with MemArray<T>::reserve that is close to MemArray<T>::reAlloc but not same.
*/
template<class T>
- void MemArray<T>::reAlloc(std::size_t newNbOfElements)
throw(INTERP_KERNEL::Exception)
+ void MemArray<T>::reAlloc(std::size_t newNbOfElements)
{
{
- if(newNbOfElements<0)
- throw INTERP_KERNEL::Exception("MemArray::reAlloc : request for negative length of data !");
if(_nb_of_elem==newNbOfElements)
return ;
T *pointer=(T*)malloc(newNbOfElements*sizeof(T));
if(_nb_of_elem==newNbOfElements)
return ;
T *pointer=(T*)malloc(newNbOfElements*sizeof(T));
@@
-413,7
+406,7
@@
namespace ParaMEDMEM
}
template<class T>
}
template<class T>
- typename MemArray<T>::Deallocator MemArray<T>::BuildFromType(DeallocType type)
throw(INTERP_KERNEL::Exception)
+ typename MemArray<T>::Deallocator MemArray<T>::BuildFromType(DeallocType type)
{
switch(type)
{
{
switch(type)
{