summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Undheim <ruben.undheim@gmail.com>2016-11-21 00:45:35 +0100
committerRuben Undheim <ruben.undheim@gmail.com>2018-11-23 21:22:01 +0100
commit5d0ebe02c2a6d113bd7e54442c8748f3b786b60c (patch)
tree5e34db2679c0adc83258b1fbe4883b6e05328a31
parentcacbf1854d6a6680a76ed269f2bc1963e99c7c37 (diff)
Don't exit from library
Gbp-Pq: Name 0006-Don-t-exit-from-library.patch
-rw-r--r--openEMS/tools/array_ops.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/openEMS/tools/array_ops.cpp b/openEMS/tools/array_ops.cpp
index 8710b3c..7100f9a 100644
--- a/openEMS/tools/array_ops.cpp
+++ b/openEMS/tools/array_ops.cpp
@@ -73,7 +73,7 @@ f4vector* Create1DArray_v4sf(const unsigned int numLines)
if (MEMALIGN( (void**)&array, 16, sizeof(typeof(f4vector))*numLines ))
{
cerr << "cannot allocate aligned memory" << endl;
- exit(3);
+ return 0;
}
for (unsigned int pos=0; pos<numLines; ++pos)
{
@@ -95,7 +95,7 @@ f4vector*** Create3DArray_v4sf(const unsigned int* numLines)
if (MEMALIGN( (void**)&array, 16, sizeof(typeof(f4vector**))*numLines[0] ))
{
cerr << "cannot allocate aligned memory" << endl;
- exit(3);
+ return 0;
}
//array = new f4vector**[numLines[0]];
for (pos[0]=0; pos[0]<numLines[0]; ++pos[0])
@@ -103,7 +103,7 @@ f4vector*** Create3DArray_v4sf(const unsigned int* numLines)
if (MEMALIGN( (void**)&array[pos[0]], 16, sizeof(typeof(f4vector*))*numLines[1] ))
{
cerr << "cannot allocate aligned memory" << endl;
- exit(3);
+ return 0;
}
//array[pos[0]] = new f4vector*[numLines[1]];
for (pos[1]=0; pos[1]<numLines[1]; ++pos[1])
@@ -111,7 +111,7 @@ f4vector*** Create3DArray_v4sf(const unsigned int* numLines)
if (MEMALIGN( (void**)&array[pos[0]][pos[1]], 16, sizeof(typeof(f4vector))*numZ ))
{
cerr << "cannot allocate aligned memory" << endl;
- exit(3);
+ return 0;
}
//array[pos[0]][pos[1]] = new f4vector[numZ];
for (pos[2]=0; pos[2]<numZ; ++pos[2])
@@ -132,7 +132,7 @@ f4vector**** Create_N_3DArray_v4sf(const unsigned int* numLines)
if (MEMALIGN( (void**)&array, 16, sizeof(typeof(f4vector***))*3 ))
{
cerr << "cannot allocate aligned memory" << endl;
- exit(3);
+ return 0;
}
//array = new f4vector***[3];
for (int n=0; n<3; ++n)