Skip to content

Commit 200617b

Browse files
authored
Merge pull request #4 from scnsh/fix-initiation-order
Fix initiation order
2 parents 7788b30 + 337eee3 commit 200617b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

CSV_Parser.cpp

Lines changed: 4 additions & 4 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_);
@@ -440,4 +440,4 @@ void CSV_Parser::parseLeftover() {
440440
free(leftover);
441441
leftover = 0;
442442
}
443-
}
443+
}

0 commit comments

Comments
 (0)