Skip to content

Commit

Permalink
Per #2887, update parse_stat_line.cc to get it to compile after chang…
Browse files Browse the repository at this point in the history
…ing PCT to store thresholds in a std::vector.
  • Loading branch information
JohnHalleyGotway committed Aug 28, 2024
1 parent 5e1d81d commit 32f3601
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/tools/core/stat_analysis/parse_stat_line.cc
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,13 @@ void parse_nbrctc_ctable(STATLine &l, TTContingencyTable &ct) {
void parse_nx2_ctable(STATLine &l, Nx2ContingencyTable &pct) {
int i, n, oy, on;
char col_str[max_str_len];
double *thresh = (double *) nullptr;

// N_THRESH
n = atoi(l.get_item("N_THRESH"));
pct.set_size(n-1);

// Allocate space for list of thresholds
thresh = new double [n];
// Store a vector of threshold values
vector<double> thresh(n);

for(i=0; i<n-1; i++) {

Expand All @@ -183,8 +182,6 @@ void parse_nx2_ctable(STATLine &l, Nx2ContingencyTable &pct) {
thresh[n-1] = atof(l.get_item(col_str));
pct.set_thresholds(thresh);

if ( thresh ) { delete [] thresh; thresh = (double *) nullptr; }

return;
}

Expand Down

0 comments on commit 32f3601

Please sign in to comment.