Commit 5020073a9103e483244fa46d5e11d34bf6cfb78d
Merge pull request #130 from biometrics/arrays_issue
Fix compile under visual studio
Showing
1 changed file
with
14 additions
and
6 deletions
openbr/plugins/slidingwindow.cpp
| ... | ... | @@ -430,12 +430,12 @@ private: |
| 430 | 430 | // each input dimension. Each input dimension corresponds to |
| 431 | 431 | // one of the input rect region. Thus, each eigenvector represents |
| 432 | 432 | // a set of overlaping regions. |
| 433 | - float midX[nRegions]; | |
| 434 | - float midY[nRegions]; | |
| 435 | - float avgWidth[nRegions]; | |
| 436 | - float avgHeight[nRegions]; | |
| 437 | - float confs[nRegions]; | |
| 438 | - int cnts[nRegions]; | |
| 433 | + float * midX = new float[nRegions]; | |
| 434 | + float * midY = new float[nRegions]; | |
| 435 | + float * avgWidth = new float[nRegions]; | |
| 436 | + float *avgHeight = new float[nRegions]; | |
| 437 | + float *confs = new float[nRegions]; | |
| 438 | + int *cnts = new int[nRegions]; | |
| 439 | 439 | int mx; |
| 440 | 440 | int mxIdx; |
| 441 | 441 | for (int i = 0 ; i < nRegions; i++) { |
| ... | ... | @@ -487,6 +487,14 @@ private: |
| 487 | 487 | t.file.set("Confidence", consolidatedConfidences.at(i)); |
| 488 | 488 | dst.append(t); |
| 489 | 489 | } |
| 490 | + | |
| 491 | + delete [] midX; | |
| 492 | + delete [] midY; | |
| 493 | + delete [] avgWidth; | |
| 494 | + delete [] avgHeight; | |
| 495 | + delete [] confs; | |
| 496 | + delete [] cnts; | |
| 497 | + | |
| 490 | 498 | } |
| 491 | 499 | }; |
| 492 | 500 | ... | ... |