summaryrefslogtreecommitdiffstats
path: root/src/misc/vec/vecFlt.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc/vec/vecFlt.h')
-rw-r--r--src/misc/vec/vecFlt.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/misc/vec/vecFlt.h b/src/misc/vec/vecFlt.h
index 8f3005a4..482973f7 100644
--- a/src/misc/vec/vecFlt.h
+++ b/src/misc/vec/vecFlt.h
@@ -86,6 +86,16 @@ static inline Vec_Flt_t * Vec_FltAlloc( int nCap )
p->pArray = p->nCap? ABC_ALLOC( float, p->nCap ) : NULL;
return p;
}
+static inline Vec_Flt_t * Vec_FltAllocExact( int nCap )
+{
+ Vec_Flt_t * p;
+ assert( nCap >= 0 );
+ p = ABC_ALLOC( Vec_Flt_t, 1 );
+ p->nSize = 0;
+ p->nCap = nCap;
+ p->pArray = p->nCap? ABC_ALLOC( float, p->nCap ) : NULL;
+ return p;
+}
/**Function*************************************************************