From 9382c539276b32e09c06cb25af2155eb996a8dd9 Mon Sep 17 00:00:00 2001 From: Charles Otto Date: Thu, 14 Nov 2013 17:42:08 -0800 Subject: [PATCH] Fix compile under visual studio --- openbr/plugins/slidingwindow.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/openbr/plugins/slidingwindow.cpp b/openbr/plugins/slidingwindow.cpp index d874250..0bb5103 100644 --- a/openbr/plugins/slidingwindow.cpp +++ b/openbr/plugins/slidingwindow.cpp @@ -430,12 +430,12 @@ private: // each input dimension. Each input dimension corresponds to // one of the input rect region. Thus, each eigenvector represents // a set of overlaping regions. - float midX[nRegions]; - float midY[nRegions]; - float avgWidth[nRegions]; - float avgHeight[nRegions]; - float confs[nRegions]; - int cnts[nRegions]; + float * midX = new float[nRegions]; + float * midY = new float[nRegions]; + float * avgWidth = new float[nRegions]; + float *avgHeight = new float[nRegions]; + float *confs = new float[nRegions]; + int *cnts = new int[nRegions]; int mx; int mxIdx; for (int i = 0 ; i < nRegions; i++) { @@ -487,6 +487,14 @@ private: t.file.set("Confidence", consolidatedConfidences.at(i)); dst.append(t); } + + delete [] midX; + delete [] midY; + delete [] avgWidth; + delete [] avgHeight; + delete [] confs; + delete [] cnts; + } }; -- libgit2 0.21.4