Skip to content

Commit 8d8926b

Browse files
authored
read headers via FileStream (#353)
1 parent e040047 commit 8d8926b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

simplecpp.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3463,7 +3463,8 @@ void simplecpp::preprocess(simplecpp::TokenList &output, const simplecpp::TokenL
34633463
std::ifstream f;
34643464
header2 = openHeader(f, dui, rawtok->location.file(), header, systemheader);
34653465
if (f.is_open()) {
3466-
TokenList * const tokens = new TokenList(f, files, header2, outputList);
3466+
f.close();
3467+
TokenList * const tokens = new TokenList(header2, files, outputList);
34673468
if (dui.removeComments)
34683469
tokens->removeComments();
34693470
filedata[header2] = tokens;

0 commit comments

Comments
 (0)