aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/SparseLU/SparseLU_Memory.h
diff options
context:
space:
mode:
Diffstat (limited to 'Eigen/src/SparseLU/SparseLU_Memory.h')
-rw-r--r--Eigen/src/SparseLU/SparseLU_Memory.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/Eigen/src/SparseLU/SparseLU_Memory.h b/Eigen/src/SparseLU/SparseLU_Memory.h
index 349bfd585..711cb7ec3 100644
--- a/Eigen/src/SparseLU/SparseLU_Memory.h
+++ b/Eigen/src/SparseLU/SparseLU_Memory.h
@@ -76,13 +76,11 @@ Index SparseLUImpl<Scalar,StorageIndex>::expand(VectorType& vec, Index& length,
old_vec = vec.segment(0,nbElts);
//Allocate or expand the current vector
-#ifdef EIGEN_EXCEPTIONS
- try
-#endif
+ EIGEN_TRY
{
vec.resize(new_len);
}
-#ifdef EIGEN_EXCEPTIONS
+#if EIGEN_USE_EXCEPTIONS
catch(std::bad_alloc& )
#else
if(!vec.size())
@@ -107,13 +105,11 @@ Index SparseLUImpl<Scalar,StorageIndex>::expand(VectorType& vec, Index& length,
{
alpha = (alpha + 1)/2;
new_len = (std::max)(length+1,Index(alpha * length));
-#ifdef EIGEN_EXCEPTIONS
- try
-#endif
+ EIGEN_TRY
{
vec.resize(new_len);
}
-#ifdef EIGEN_EXCEPTIONS
+#if EIGEN_USE_EXCEPTIONS
catch(std::bad_alloc& )
#else
if (!vec.size())