Skip to content

Commit f4171cb

Browse files
committed
fix initiation order
1 parent 7788b30 commit f4171cb

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

CSV_Parser.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,17 @@ void CSV_Parser::AssignIsFmtUnsignedArray(const char * fmt_) {
6464
}
6565

6666
CSV_Parser::CSV_Parser(const char * s, const char * fmt_, bool has_header_, char delimiter_, char quote_char_) :
67+
fmt( strdup_ignoring_u(fmt_) ),
6768
rows_count(NULL),
6869
cols_count( strlen_ignoring_u(fmt_) ),
69-
fmt( strdup_ignoring_u(fmt_) ),
7070
has_header(has_header_),
7171
delimiter(delimiter_),
7272
quote_char(quote_char_),
7373
delim_chars({'\r', '\n', delimiter_, 0}),
74-
leftover(NULL),
75-
current_col(NULL),
7674
whole_csv_supplied(false),
7775
//whole_csv_supplied((bool)s ? true : false), // in constructor where whole csv is not supplied at once it should be set to false
76+
leftover(NULL),
77+
current_col(NULL),
7878
header_parsed(!has_header_)
7979
{
8080
AssignIsFmtUnsignedArray(fmt_);
@@ -441,3 +441,4 @@ void CSV_Parser::parseLeftover() {
441441
leftover = 0;
442442
}
443443
}
444+

0 commit comments

Comments
 (0)