[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master c59d263 4/5: Replace C-style array with vecto
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master c59d263 4/5: Replace C-style array with vector |
Date: |
Wed, 25 Apr 2018 10:53:48 -0400 (EDT) |
branch: master
commit c59d2632f6019ea31607fa2cecba69b707fb8ed9
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Replace C-style array with vector
---
group_quote_pdf_gen_wx.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/group_quote_pdf_gen_wx.cpp b/group_quote_pdf_gen_wx.cpp
index f302e36..1076110 100644
--- a/group_quote_pdf_gen_wx.cpp
+++ b/group_quote_pdf_gen_wx.cpp
@@ -346,7 +346,8 @@ class group_quote_pdf_generator_wx
struct row_data
{
- std::string output_values[e_col_max];
+ row_data() {output_values.resize(e_col_max);}
+ std::vector<std::string> output_values;
};
std::vector<row_data> rows_;
@@ -762,7 +763,7 @@ void group_quote_pdf_generator_wx::save(std::string const&
output_filename)
for(auto const& i : rows_)
{
- table_gen.output_row(&pos_y, i.output_values);
+ table_gen.output_row(&pos_y, i.output_values.data());
if(last_row_y <= pos_y)
{