Skip to content

Commit

Permalink
Per #3006, SonarQube updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnHalleyGotway committed Jan 22, 2025
1 parent 3a536fe commit 4173d4c
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 37 deletions.
6 changes: 3 additions & 3 deletions src/libcode/vx_analysis_util/mode_job.cc
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ if ( n_dump == 0 ) {
dump_at.set_precision(get_precision());
dump_at.set_bad_data_value(bad_data_double);
dump_at.set_bad_data_str(na_str);
dump_at.set_delete_trailing_blank_rows(1);
dump_at.set_delete_trailing_blank_rows(true);

// Write out the MODE header columns
for (j=0; j<n_mode_hdr_columns; ++j) {
Expand Down Expand Up @@ -489,7 +489,7 @@ for (j=1; j<table.ncols(); ++j) table.set_column_just(j, RightJust);

table.set_bad_data_value(bad_data_double);
table.set_bad_data_str(na_str);
table.set_delete_trailing_blank_rows(1);
table.set_delete_trailing_blank_rows(true);
table.set_ics(3);


Expand Down Expand Up @@ -841,7 +841,7 @@ for (j=1; j<table.ncols(); ++j) table.set_column_just(j, RightJust);

table.set_bad_data_value(bad_data_double);
table.set_bad_data_str(na_str);
table.set_delete_trailing_blank_rows(1);
table.set_delete_trailing_blank_rows(true);
table.set_ics(3);

//
Expand Down
6 changes: 3 additions & 3 deletions src/libcode/vx_analysis_util/stat_job.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2042,7 +2042,7 @@ void STATAnalysisJob::setup_stat_file(int n_row, int n) {
stat_at.set_precision(precision);
stat_at.set_bad_data_value(bad_data_double);
stat_at.set_bad_data_str(na_str);
stat_at.set_delete_trailing_blank_rows(1);
stat_at.set_delete_trailing_blank_rows(true);

//
// Write the STAT header row
Expand Down Expand Up @@ -2121,7 +2121,7 @@ void STATAnalysisJob::setup_stat_file(int n_row, int n) {
stat_at.set_precision(precision);
stat_at.set_bad_data_value(bad_data_double);
stat_at.set_bad_data_str(na_str);
stat_at.set_delete_trailing_blank_rows(1);
stat_at.set_delete_trailing_blank_rows(true);
}
}

Expand Down Expand Up @@ -2171,7 +2171,7 @@ void STATAnalysisJob::dump_stat_line(const STATLine &line,
dump_at.set_precision(precision);
dump_at.set_bad_data_value(bad_data_double);
dump_at.set_bad_data_str(na_str);
dump_at.set_delete_trailing_blank_rows(1);
dump_at.set_delete_trailing_blank_rows(true);

//
// If the line_type is set to a single value
Expand Down
2 changes: 1 addition & 1 deletion src/libcode/vx_shapedata/engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3029,7 +3029,7 @@ void write_engine_stats(ModeFuzzyEngine & eng, const Grid & grid, AsciiTable & a
eng.conf_info.conf.output_precision());
at.set_bad_data_value(bad_data_double); // Set the bad data value
at.set_bad_data_str(na_str); // Set the bad data string
at.set_delete_trailing_blank_rows(1); // No trailing blank rows
at.set_delete_trailing_blank_rows(true); // No trailing blank rows

//
// calculate n_valid
Expand Down
2 changes: 1 addition & 1 deletion src/tools/core/ensemble_stat/ensemble_stat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2077,7 +2077,7 @@ void setup_table(AsciiTable &at) {
at.set_bad_data_str(na_str);

// Don't write out trailing blank rows
at.set_delete_trailing_blank_rows(1);
at.set_delete_trailing_blank_rows(true);

return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/tools/core/grid_stat/grid_stat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ void setup_table(AsciiTable &at) {
at.set_bad_data_str(na_str);

// Don't write out trailing blank rows
at.set_delete_trailing_blank_rows(1);
at.set_delete_trailing_blank_rows(true);

return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/tools/core/mode/mode_exec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2510,7 +2510,7 @@ void ModeExecutive::write_ct_stats()
engine.conf_info.conf.output_precision());
cts_at.set_bad_data_value(bad_data_double); // Set the bad data value
cts_at.set_bad_data_str(na_str); // Set the bad data string
cts_at.set_delete_trailing_blank_rows(1); // No trailing blank rows
cts_at.set_delete_trailing_blank_rows(true); // No trailing blank rows

//
// Write out the MODE header columns
Expand Down
27 changes: 12 additions & 15 deletions src/tools/core/pair_stat/pair_stat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,13 @@ int met_main(int argc, char *argv[]) {

////////////////////////////////////////////////////////////////////////

const string get_tool_name() {
string get_tool_name() {
return "pair_stat";
}

////////////////////////////////////////////////////////////////////////

void process_command_line(int argc, char **argv) {
static void process_command_line(int argc, char **argv) {
const char *method_name = "process_command_line() -> ";

// Default output file base
Expand Down Expand Up @@ -241,9 +241,7 @@ void process_command_line(int argc, char **argv) {

////////////////////////////////////////////////////////////////////////

void setup_txt_files() {
int max_col, max_prob_col, max_mctc_col, max_orank_col;
int n_prob, n_cat, n_eclv;
static void setup_txt_files() {
ConcatString base_name;

// Create output file names for the stat file and optional text files
Expand All @@ -256,17 +254,16 @@ void setup_txt_files() {
/////////////////////////////////////////////////////////////////////

// Get the maximum number of data columns
n_prob = conf_info.get_max_n_fprob_thresh();
n_cat = conf_info.get_max_n_cat_thresh() + 1;
n_eclv = conf_info.get_max_n_eclv_points();
int n_prob = conf_info.get_max_n_fprob_thresh();
int n_cat = conf_info.get_max_n_cat_thresh() + 1;
int n_eclv = conf_info.get_max_n_eclv_points();

max_prob_col = get_n_pjc_columns(n_prob);
max_mctc_col = get_n_mctc_columns(n_cat);
int max_prob_col = get_n_pjc_columns(n_prob);
int max_mctc_col = get_n_mctc_columns(n_cat);

// Determine the maximum number of data columns
max_col = (max_prob_col > max_stat_col ? max_prob_col : max_stat_col);
if (max_mctc_col > max_col) max_col = max_mctc_col;
if (max_orank_col > max_col) max_col = max_orank_col;
int max_col = (max_prob_col > max_stat_col ? max_prob_col : max_stat_col);
if (max_mctc_col > max_col) max_col = max_mctc_col;

// Add the header columns
max_col += n_header_columns + 1;
Expand All @@ -285,7 +282,7 @@ void setup_txt_files() {
setup_table(stat_at);

// Write the text header row
write_header_row((const char **) 0, 0, 1, stat_at, 0, 0);
write_header_row(nullptr, 0, 1, stat_at, 0, 0);

// Initialize the row index to 1 to account for the header
i_stat_row = 1;
Expand Down Expand Up @@ -406,7 +403,7 @@ void setup_table(AsciiTable &at) {
at.set_bad_data_str(na_str);

// Don't write out trailing blank rows
at.set_delete_trailing_blank_rows(1);
at.set_delete_trailing_blank_rows(true);

return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/tools/core/point_stat/point_stat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ void setup_table(AsciiTable &at) {
at.set_bad_data_str(na_str);

// Don't write out trailing blank rows
at.set_delete_trailing_blank_rows(1);
at.set_delete_trailing_blank_rows(true);

return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/tools/core/stat_analysis/stat_analysis_job.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4407,7 +4407,7 @@ void setup_table(AsciiTable &at, int n_hdr_cols, int prec) {
at.set_bad_data_str(na_str);

// Don't write out trailing blank rows
at.set_delete_trailing_blank_rows(1);
at.set_delete_trailing_blank_rows(true);

return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/tools/core/wavelet_stat/wavelet_stat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ void setup_table(AsciiTable &at) {
at.set_bad_data_str(na_str);

// Don't write out trailing blank rows
at.set_delete_trailing_blank_rows(1);
at.set_delete_trailing_blank_rows(true);

return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/tools/other/gsi_tools/gsi_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ void setup_table(AsciiTable &at) {
at.set_bad_data_str(na_str);

// Don't write out trailing blank rows
at.set_delete_trailing_blank_rows(1);
at.set_delete_trailing_blank_rows(true);

return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/tools/tc_utils/tc_gen/tc_gen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1909,7 +1909,7 @@ void setup_table(AsciiTable &at) {
at.set_bad_data_str(na_str);

// Don't write out trailing blank rows
at.set_delete_trailing_blank_rows(1);
at.set_delete_trailing_blank_rows(true);

return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/tools/tc_utils/tc_pairs/tc_pairs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2264,7 +2264,7 @@ void setup_table(AsciiTable &at) {
at.set_bad_data_str(na_str);

// Don't write out trailing blank rows
at.set_delete_trailing_blank_rows(1);
at.set_delete_trailing_blank_rows(true);

return;
}
Expand Down
12 changes: 6 additions & 6 deletions src/tools/tc_utils/tc_stat/tc_stat_job.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,7 @@ void TCStatJob::dump_pair(const TrackPairInfo &pair, ofstream *out,
out_at.set_precision(get_precision());
out_at.set_bad_data_value(bad_data_double);
out_at.set_bad_data_str(na_str);
out_at.set_delete_trailing_blank_rows(1);
out_at.set_delete_trailing_blank_rows(true);

// Setup header columns
tchc.clear();
Expand Down Expand Up @@ -2443,7 +2443,7 @@ void TCStatJobSummary::do_output(ostream &out) {
out_at.set_precision(get_precision());
out_at.set_bad_data_value(bad_data_double);
out_at.set_bad_data_str(na_str);
out_at.set_delete_trailing_blank_rows(1);
out_at.set_delete_trailing_blank_rows(true);

// Set up CIInfo objects
mean_ci.allocate_n_alpha(1);
Expand Down Expand Up @@ -3750,7 +3750,7 @@ void TCStatJobRIRW::setup_stat_file(int n_row) {
stat_at.set_precision(Precision);
stat_at.set_bad_data_value(bad_data_double);
stat_at.set_bad_data_str(na_str);
stat_at.set_delete_trailing_blank_rows(1);
stat_at.set_delete_trailing_blank_rows(true);

//
// Write the STAT header row
Expand Down Expand Up @@ -3800,7 +3800,7 @@ void TCStatJobRIRW::setup_stat_file(int n_row) {
stat_at.set_precision(Precision);
stat_at.set_bad_data_value(bad_data_double);
stat_at.set_bad_data_str(na_str);
stat_at.set_delete_trailing_blank_rows(1);
stat_at.set_delete_trailing_blank_rows(true);
}
}

Expand Down Expand Up @@ -4119,7 +4119,7 @@ void TCStatJobProbRIRW::close_dump_file() {
out_at.set_precision(get_precision());
out_at.set_bad_data_value(bad_data_double);
out_at.set_bad_data_str(na_str);
out_at.set_delete_trailing_blank_rows(1);
out_at.set_delete_trailing_blank_rows(true);

// Open the dump file back up for reading
if(!f.open(DumpFile.c_str())) {
Expand Down Expand Up @@ -4502,7 +4502,7 @@ void setup_table(AsciiTable &at, int n_hdr_cols, int prec) {
at.set_bad_data_str(na_str);

// Don't write out trailing blank rows
at.set_delete_trailing_blank_rows(1);
at.set_delete_trailing_blank_rows(true);

return;
}
Expand Down

0 comments on commit 4173d4c

Please sign in to comment.