replaced alloca() (a.k.a. cvStackAlloc) with AutoBuffer or vector() everywhere. cvStackAlloc() is still defined, but we do not need alloca() anymore to compile and run OpenCV (fixes #889 and may be some others)

This commit is contained in:
Vadim Pisarevsky
2011-02-18 10:36:18 +00:00
parent 0e81d9a11c
commit c5e3869c32
3 changed files with 7 additions and 6 deletions

View File

@@ -3619,7 +3619,6 @@ icvReadSparseMat( CvFileStorage* fs, CvFileNode* node )
CvFileNode* sizes_node;
CvSeqReader reader;
CvSeq* elements;
int* idx;
int sizes[CV_MAX_DIM_HEAP], dims, elem_type, cn;
int i;
@@ -3645,7 +3644,7 @@ icvReadSparseMat( CvFileStorage* fs, CvFileNode* node )
mat = cvCreateSparseMat( dims, sizes, elem_type );
cn = CV_MAT_CN(elem_type);
idx = (int*)alloca( dims*sizeof(idx[0]) );
int idx[CV_MAX_DIM_HEAP];
elements = data->data.seq;
cvStartReadRawData( fs, data, &reader );