Skip to content

Commit

Permalink
table: fix initial data row capacity
Browse files Browse the repository at this point in the history
  • Loading branch information
James authored and JamesMcClung committed Jul 16, 2024
1 parent bdebeb3 commit 8e5184b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/psc_bgk_util/table.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ class Table
static std::vector<double> parse_data_row(std::istringstream& word_stream,
int expected_n_cols)
{
std::vector<double> data_row(expected_n_cols);
std::vector<double> data_row;
data_row.reserve(expected_n_cols);
for (std::string word; word_stream >> word;) {
data_row.push_back(std::stod(word));
}
Expand Down

0 comments on commit 8e5184b

Please sign in to comment.