Skip to content

Commit d25d3cd

Browse files
committed
use FileStream for includes as well
1 parent 8cab5d1 commit d25d3cd

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

simplecpp.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2876,8 +2876,9 @@ std::map<std::string, simplecpp::TokenList*> simplecpp::load(const simplecpp::To
28762876
}
28772877
continue;
28782878
}
2879+
fin.close();
28792880

2880-
TokenList *tokenlist = new TokenList(fin, fileNumbers, filename, outputList);
2881+
TokenList *tokenlist = new TokenList(fileNumbers, filename, outputList);
28812882
if (!tokenlist->front()) {
28822883
delete tokenlist;
28832884
continue;
@@ -2915,8 +2916,9 @@ std::map<std::string, simplecpp::TokenList*> simplecpp::load(const simplecpp::To
29152916
const std::string header2 = openHeader(f,dui,sourcefile,header,systemheader);
29162917
if (!f.is_open())
29172918
continue;
2919+
f.close();
29182920

2919-
TokenList *tokens = new TokenList(f, fileNumbers, header2, outputList);
2921+
TokenList *tokens = new TokenList(fileNumbers, header2, outputList);
29202922
ret[header2] = tokens;
29212923
if (tokens->front())
29222924
filelist.push_back(tokens->front());

0 commit comments

Comments
 (0)