From 290b272cdaf0c0f04d3536080f3918893e489094 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 12 Jul 2009 23:31:36 +0000 Subject: Since now using exceptions, don't check result from new. --- src/SVector.h | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) (limited to 'src/SVector.h') diff --git a/src/SVector.h b/src/SVector.h index 9f56da528..7b929190d 100644 --- a/src/SVector.h +++ b/src/SVector.h @@ -23,7 +23,6 @@ class SVector { int *v; ///< The vector unsigned int size; ///< Number of elements allocated unsigned int len; ///< Number of elements used in vector - bool allocFailure; ///< A memory allocation call has failed /** Internally allocate more elements than the user wants * to avoid thrashing the memory allocator. */ @@ -33,12 +32,8 @@ class SVector { else newSize = (newSize * 3) / 2; int* newv = new int[newSize]; - if (!newv) { - allocFailure = true; - return; - } size = newSize; - unsigned int i=0; + unsigned int i=0; for (; i 0) { SizeTo(other.Length()); - if (!allocFailure) { - for (int i=0;i 0) { SizeTo(other.Length()); - if (!allocFailure) { - for (int i=0;i