Skip to content

Commit

Permalink
Squashed 'librtprocess/' changes from 695c10a..6f780ef0
Browse files Browse the repository at this point in the history
6f780ef0 Fixes two unique_ptr so they call delete[] instead of delete

git-subtree-dir: librtprocess
git-subtree-split: 6f780ef0a63d1d94f7f3f3c38aa8598ed9b50198
  • Loading branch information
fcomida committed Aug 23, 2019
1 parent 695c10a commit 3b22dfc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/preprocess/CA_correct.cc
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ rpError CA_correct(
const int hblsz = ceil((float)(width + border2) / (ts - border2) + 2 + hz1);

//temporary array to store simple interpolation of G
std::unique_ptr<float> buffer(new (std::nothrow) float[height * width + vblsz * hblsz * (2 * 2 + 1)]);
std::unique_ptr<float[]> buffer(new (std::nothrow) float[height * width + vblsz * hblsz * (2 * 2 + 1)]);

float *Gtmp = buffer.get();
if (!Gtmp) {
Expand Down Expand Up @@ -259,7 +259,7 @@ rpError CA_correct(
// assign working space
constexpr int buffersize = ts * ts + 8 * ts * tsh + 8 * 16;
constexpr int buffersizePassTwo = ts * ts + 4 * ts * tsh + 4 * 16;
std::unique_ptr<float> bufferThr(new (std::nothrow) float[(autoCA && !fitParamsSet) ? buffersize : buffersizePassTwo]);
std::unique_ptr<float[]> bufferThr(new (std::nothrow) float[(autoCA && !fitParamsSet) ? buffersize : buffersizePassTwo]);
float *data = bufferThr.get();
#ifdef _OPENMP
#pragma omp critical
Expand Down

0 comments on commit 3b22dfc

Please sign in to comment.